From: Peter Amstutz Date: Wed, 15 May 2019 14:30:38 +0000 (-0400) Subject: Merge branch 'master' into 15064-wb2-fed-login X-Git-Tag: 1.4.0~10^2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/fd470d8f7838b57777492289e6e4195b6c39bd2e Merge branch 'master' into 15064-wb2-fed-login Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- fd470d8f7838b57777492289e6e4195b6c39bd2e 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 = (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 paperProps?: PaperProps; actions?: React.ReactNode; hideSearchInput?: boolean; - header?: React.ReactNode; ++ title?: React.ReactNode; paperKey?: string; currentItemUuid: string; - title?: string; } interface DataExplorerActionProps { @@@ -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 - {title ?
Content Address: {title}
: null} -- {(!hideColumnSelector || !hideSearchInput) && ++ {title &&
{title}
} ++ {(!hideColumnSelector || !hideSearchInput) && - {header &&
{header}
}
{!hideSearchInput && = (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 = [ + { + name: CollectionContentAddressPanelColumnNames.COLLECTION_WITH_THIS_ADDRESS, + selected: true, + configurable: true, + sortDirection: SortDirection.NONE, + filters: createTree(), + render: uuid => + }, + { + name: CollectionContentAddressPanelColumnNames.LOCATION, + selected: true, + configurable: true, + filters: createTree(), + render: uuid => + }, + { + name: CollectionContentAddressPanelColumnNames.LAST_MODIFIED, + selected: true, + configurable: true, + sortDirection: SortDirection.DESC, + filters: createTree(), + render: uuid => + } + ]; + + export interface CollectionContentAddressPanelActionProps { + onContextMenu: (event: React.MouseEvent, uuid: string) => void; + onItemClick: (item: string) => void; + onItemDoubleClick: (item: string) => void; + } + + const mapDispatchToProps = (dispatch: Dispatch): CollectionContentAddressPanelActionProps => ({ + onContextMenu: (event, resourceUuid) => { + const isAdmin = dispatch(getIsAdmin()); + const kind = resourceKindToContextMenuKind(resourceUuid, isAdmin); + if (kind) { + dispatch(openContextMenu(event, { + name: '', + uuid: resourceUuid, + ownerUuid: '', + kind: ResourceKind.NONE, + menuKind: kind + })); + } + dispatch(loadDetailsPanel(resourceUuid)); + }, + onItemClick: (uuid: string) => { + dispatch(loadDetailsPanel(uuid)); + }, + onItemDoubleClick: uuid => { + dispatch(navigateTo(uuid)); + } + }); + + interface CollectionContentAddressDataProps { + match: { + params: { id: string } + }; + } + + export const CollectionsContentAddressPanel = withStyles(styles)( + connect(null, mapDispatchToProps)( + class extends React.Component> { + render() { + return + + + } />; + ; + } + } + ) -); ++); 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 ? -

Searching clusters: {props.sessions.filter((ss) => ss.loggedIn).map((ss) => {ss.clusterId})}

: -

Searching local cluster {props.localCluster} only. To search multiple clusters, start from your home Workbench.

++
Searching clusters: {props.sessions.filter((ss) => ss.loggedIn).map((ss) => {ss.clusterId})}
: ++
Searching local cluster {props.localCluster} only. To search multiple clusters, start from your home Workbench.
+ } + />; }; 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 - ++