[ARVADOS-WORKBENCH2] updated: 1.3.1-469-gfc5cb3c6

Git user git at public.curoverse.com
Wed May 15 14:31:14 UTC 2019


Summary of changes:
 src/common/config.ts                               |  3 +-
 src/components/data-explorer/data-explorer.tsx     | 11 ++++--
 src/index.tsx                                      |  4 +-
 src/routes/routes.ts                               |  1 +
 src/services/auth-service/auth-service.ts          | 11 +++++-
 src/store/auth/auth-action-session.ts              |  2 +-
 src/store/auth/auth-action.ts                      | 26 ++++++++++--
 src/store/auth/auth-reducer.ts                     | 11 +++++-
 src/views-components/api-token/api-token.tsx       |  8 +++-
 .../main-app-bar/anonymous-menu.tsx                |  2 +-
 .../collection-content-address-panel.tsx           |  4 +-
 src/views/login-panel/login-panel.tsx              |  2 +-
 .../search-results-panel-view.tsx                  | 16 +++++++-
 .../search-results-panel/search-results-panel.tsx  | 12 +++++-
 src/views/workbench/fed-login.tsx                  | 46 ++++++++++++++++++++++
 src/views/workbench/workbench.tsx                  |  4 +-
 16 files changed, 140 insertions(+), 23 deletions(-)
 create mode 100644 src/views/workbench/fed-login.tsx

       via  fc5cb3c6ccabcc1da401d0dd9858fab764e31235 (commit)
       via  fd470d8f7838b57777492289e6e4195b6c39bd2e (commit)
       via  f35559bdd3569d836d084524ff64ed050e3c926e (commit)
       via  2a60ee742601aec7a0bc6ee832da39d834d82eb7 (commit)
       via  59000cfd2934a50da18b5e70fd14f12abd020eb7 (commit)
       via  276af50119307b73027c939308ac6eabf4d86a8b (commit)
       via  825b555f06eb9dfb987dee1d072bba6874552a8a (commit)
       via  0209f5e7f2ec688f545f5025bafee2f2ea90a71b (commit)
       via  ccf093578f01b3d8ac0c421f85063939b3cd271d (commit)
      from  4b961d16b8f8ef8afbd13697a79fe4684acd0416 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit fc5cb3c6ccabcc1da401d0dd9858fab764e31235
Merge: 4b961d16 fd470d8f
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Wed May 15 10:30:57 2019 -0400

    Merge branch '15064-wb2-fed-login' refs #15064
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>


commit fd470d8f7838b57777492289e6e4195b6c39bd2e
Merge: f35559bd 4b961d16
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Wed May 15 10:30:38 2019 -0400

    Merge branch 'master' into 15064-wb2-fed-login
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --cc src/components/data-explorer/data-explorer.tsx
index 9f727049,5f019577..7107bd70
--- a/src/components/data-explorer/data-explorer.tsx
+++ b/src/components/data-explorer/data-explorer.tsx
@@@ -14,7 -14,7 +14,7 @@@ import { DataTableFilters } from '~/com
  import { MoreOptionsIcon } from '~/components/icon/icon';
  import { PaperProps } from '@material-ui/core/Paper';
  
- type CssRules = 'searchBox' | "toolbar" | "footer" | "root" | 'moreOptionsButton';
 -type CssRules = 'searchBox' | "toolbar" | "footer" | "root" | 'moreOptionsButton' | 'title';
++type CssRules = 'searchBox' | "toolbar" | "toolbarUnderTitle" | "footer" | "root" | 'moreOptionsButton' | 'title';
  
  const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
      searchBox: {
@@@ -23,6 -23,6 +23,9 @@@
      toolbar: {
          paddingTop: theme.spacing.unit * 2
      },
++    toolbarUnderTitle: {
++        paddingTop: 0
++    },
      footer: {
          overflow: 'auto'
      },
@@@ -50,9 -55,9 +58,9 @@@ interface DataExplorerDataProps<T> 
      paperProps?: PaperProps;
      actions?: React.ReactNode;
      hideSearchInput?: boolean;
-     header?: React.ReactNode;
++    title?: React.ReactNode;
      paperKey?: string;
      currentItemUuid: string;
 -    title?: string;
  }
  
  interface DataExplorerActionProps<T> {
@@@ -85,12 -90,12 +93,12 @@@ export const DataExplorer = withStyles(
                  rowsPerPage, rowsPerPageOptions, onColumnToggle, searchValue, onSearch,
                  items, itemsAvailable, onRowClick, onRowDoubleClick, classes,
                  dataTableDefaultView, hideColumnSelector, actions, paperProps, hideSearchInput,
-                 paperKey, fetchMode, currentItemUuid, header
+                 paperKey, fetchMode, currentItemUuid, title
              } = this.props;
              return <Paper className={classes.root} {...paperProps} key={paperKey}>
 -                {title ? <div className={classes.title}>Content Address: {title}</div> : null}
--                {(!hideColumnSelector || !hideSearchInput) && <Toolbar className={classes.toolbar}>
++                {title && <div className={classes.title}>{title}</div>}
++                {(!hideColumnSelector || !hideSearchInput) && <Toolbar className={title ? classes.toolbarUnderTitle : classes.toolbar}>
                      <Grid container justify="space-between" wrap="nowrap" alignItems="center">
-                         {header && <div>{header}</div>}
                          <div className={classes.searchBox}>
                              {!hideSearchInput && <SearchInput
                                  value={searchValue}
diff --cc src/views/collection-content-address-panel/collection-content-address-panel.tsx
index 00000000,89b23f7c..b652b502
mode 000000,100644..100644
--- a/src/views/collection-content-address-panel/collection-content-address-panel.tsx
+++ b/src/views/collection-content-address-panel/collection-content-address-panel.tsx
@@@ -1,0 -1,154 +1,154 @@@
+ // Copyright (C) The Arvados Authors. All rights reserved.
+ //
+ // SPDX-License-Identifier: AGPL-3.0
+ 
+ import * as React from 'react';
+ import { StyleRulesCallback, WithStyles, withStyles, Grid, Button } from '@material-ui/core';
+ import { CollectionIcon } from '~/components/icon/icon';
+ import { ArvadosTheme } from '~/common/custom-theme';
+ import { BackIcon } from '~/components/icon/icon';
+ import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view';
+ import { COLLECTIONS_CONTENT_ADDRESS_PANEL_ID } from '~/store/collections-content-address-panel/collections-content-address-panel-actions';
+ import { DataExplorer } from "~/views-components/data-explorer/data-explorer";
+ import { Dispatch } from 'redux';
+ import { getIsAdmin } from '~/store/public-favorites/public-favorites-actions';
+ import { resourceKindToContextMenuKind, openContextMenu } from '~/store/context-menu/context-menu-actions';
+ import { ResourceKind } from '~/models/resource';
+ import { loadDetailsPanel } from '~/store/details-panel/details-panel-action';
+ import { connect } from 'react-redux';
+ import { navigateTo } from '~/store/navigation/navigation-action';
+ import { DataColumns } from '~/components/data-table/data-table';
+ import { SortDirection } from '~/components/data-table/data-column';
+ import { createTree } from '~/models/tree';
+ import { ResourceName, ResourceOwnerName, ResourceLastModifiedDate } from '~/views-components/data-explorer/renderers';
+ 
+ type CssRules = 'backLink' | 'backIcon' | 'card' | 'title' | 'iconHeader' | 'link';
+ 
+ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
+     backLink: {
+         fontSize: '14px',
+         fontWeight: 600,
+         display: 'flex',
+         alignItems: 'center',
+         padding: theme.spacing.unit,
+         marginBottom: theme.spacing.unit,
+         color: theme.palette.grey["700"],
+     },
+     backIcon: {
+         marginRight: theme.spacing.unit
+     },
+     card: {
+         width: '100%'
+     },
+     title: {
+         color: theme.palette.grey["700"]
+     },
+     iconHeader: {
+         fontSize: '1.875rem',
+         color: theme.customs.colors.green700
+     },
+     link: {
+         fontSize: '0.875rem',
+         color: theme.palette.primary.main,
+         textAlign: 'right',
+         '&:hover': {
+             cursor: 'pointer'
+         }
+     }
+ });
+ 
+ enum CollectionContentAddressPanelColumnNames {
+     COLLECTION_WITH_THIS_ADDRESS = "Collection with this address",
+     LOCATION = "Location",
+     LAST_MODIFIED = "Last modified"
+ }
+ 
+ export const collectionContentAddressPanelColumns: DataColumns<string> = [
+     {
+         name: CollectionContentAddressPanelColumnNames.COLLECTION_WITH_THIS_ADDRESS,
+         selected: true,
+         configurable: true,
+         sortDirection: SortDirection.NONE,
+         filters: createTree(),
+         render: uuid => <ResourceName uuid={uuid} />
+     },
+     {
+         name: CollectionContentAddressPanelColumnNames.LOCATION,
+         selected: true,
+         configurable: true,
+         filters: createTree(),
+         render: uuid => <ResourceOwnerName uuid={uuid} />
+     },
+     {
+         name: CollectionContentAddressPanelColumnNames.LAST_MODIFIED,
+         selected: true,
+         configurable: true,
+         sortDirection: SortDirection.DESC,
+         filters: createTree(),
+         render: uuid => <ResourceLastModifiedDate uuid={uuid} />
+     }
+ ];
+ 
+ export interface CollectionContentAddressPanelActionProps {
+     onContextMenu: (event: React.MouseEvent<any>, uuid: string) => void;
+     onItemClick: (item: string) => void;
+     onItemDoubleClick: (item: string) => void;
+ }
+ 
+ const mapDispatchToProps = (dispatch: Dispatch): CollectionContentAddressPanelActionProps => ({
+     onContextMenu: (event, resourceUuid) => {
+         const isAdmin = dispatch<any>(getIsAdmin());
+         const kind = resourceKindToContextMenuKind(resourceUuid, isAdmin);
+         if (kind) {
+             dispatch<any>(openContextMenu(event, {
+                 name: '',
+                 uuid: resourceUuid,
+                 ownerUuid: '',
+                 kind: ResourceKind.NONE,
+                 menuKind: kind
+             }));
+         }
+         dispatch<any>(loadDetailsPanel(resourceUuid));
+     },
+     onItemClick: (uuid: string) => {
+         dispatch<any>(loadDetailsPanel(uuid));
+     },
+     onItemDoubleClick: uuid => {
+         dispatch<any>(navigateTo(uuid));
+     }
+ });
+ 
+ interface CollectionContentAddressDataProps {
+     match: {
+         params: { id: string }
+     };
+ }
+ 
+ export const CollectionsContentAddressPanel = withStyles(styles)(
+     connect(null, mapDispatchToProps)(
+         class extends React.Component<CollectionContentAddressPanelActionProps & CollectionContentAddressDataProps & WithStyles<CssRules>> {
+             render() {
+                 return <Grid item xs={12}>
+                     <Button
+                         onClick={() => history.back()}
+                         className={this.props.classes.backLink}>
+                         <BackIcon className={this.props.classes.backIcon} />
+                         Back
+                     </Button>
+                     <DataExplorer
+                         id={COLLECTIONS_CONTENT_ADDRESS_PANEL_ID}
+                         onRowClick={this.props.onItemClick}
+                         onRowDoubleClick={this.props.onItemDoubleClick}
+                         onContextMenu={this.props.onContextMenu}
+                         contextMenuColumn={true}
 -                        title={this.props.match.params.id}
++                        title={`Content address: ${this.props.match.params.id}`}
+                         dataTableDefaultView={
+                             <DataTableDefaultView
+                                 icon={CollectionIcon}
+                                 messages={['Collections with this content address not found.']} />
+                         } />;
+                     </Grid >;
+             }
+         }
+     )
 -);
++);
diff --cc src/views/search-results-panel/search-results-panel-view.tsx
index df6a7e8c,368a0d64..72a9b282
--- a/src/views/search-results-panel/search-results-panel-view.tsx
+++ b/src/views/search-results-panel/search-results-panel-view.tsx
@@@ -126,11 -118,5 +126,11 @@@ export const SearchResultsPanelView = (
          onRowDoubleClick={props.onItemDoubleClick}
          onContextMenu={props.onContextMenu}
          contextMenuColumn={true}
 -        hideSearchInput />;
 +        hideSearchInput
-         header={
++        title={
 +            props.localCluster === homeCluster ?
-                 <p>Searching clusters: {props.sessions.filter((ss) => ss.loggedIn).map((ss) => <span key={ss.clusterId}> {ss.clusterId}</span>)}</p> :
-                 <p>Searching local cluster {props.localCluster} only.  To search multiple clusters, <a href={props.remoteHostsConfig[homeCluster] && props.remoteHostsConfig[homeCluster].workbench2Url}> start from your home Workbench.</a></p>
++                <div>Searching clusters: {props.sessions.filter((ss) => ss.loggedIn).map((ss) => <span key={ss.clusterId}> {ss.clusterId}</span>)}</div> :
++                <div>Searching local cluster {props.localCluster} only.  To search multiple clusters, <a href={props.remoteHostsConfig[homeCluster] && props.remoteHostsConfig[homeCluster].workbench2Url}> start from your home Workbench.</a></div>
 +        }
 +    />;
  };
diff --cc src/views/workbench/workbench.tsx
index e0997ea1,e3668373..20cbbdea
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@@ -92,7 -92,7 +92,8 @@@ import { GroupMemberAttributesDialog } 
  import { AddGroupMembersDialog } from '~/views-components/dialog-forms/add-group-member-dialog';
  import { PartialCopyToCollectionDialog } from '~/views-components/dialog-forms/partial-copy-to-collection-dialog';
  import { PublicFavoritePanel } from '~/views/public-favorites-panel/public-favorites-panel';
 +import { FedLogin } from './fed-login';
+ import { CollectionsContentAddressPanel } from '~/views/collection-content-address-panel/collection-content-address-panel';
  
  type CssRules = 'root' | 'container' | 'splitter' | 'asidePanel' | 'contentWrapper' | 'content';
  
@@@ -177,6 -177,7 +178,7 @@@ export const WorkbenchPanel 
                                  <Route path={Routes.GROUP_DETAILS} component={GroupDetailsPanel} />
                                  <Route path={Routes.LINKS} component={LinkPanel} />
                                  <Route path={Routes.PUBLIC_FAVORITES} component={PublicFavoritePanel} />
 -                                <Route path={Routes.COLLECTIONS_CONTENT_ADDRESS} component={CollectionsContentAddressPanel}/>
++                                <Route path={Routes.COLLECTIONS_CONTENT_ADDRESS} component={CollectionsContentAddressPanel} />
                              </Switch>
                          </Grid>
                      </Grid>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list