X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/98d1b780b15d9995ec5ef6cae25c0663702ede4f..70346cc28458475026a54c0d4ac1df2264080d55:/src/views/collection-content-address-panel/collection-content-address-panel.tsx diff --git a/src/views/collection-content-address-panel/collection-content-address-panel.tsx b/src/views/collection-content-address-panel/collection-content-address-panel.tsx index 5ca392fe..b652b502 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 @@ -3,10 +3,7 @@ // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; -import { Link } from 'react-router-dom'; -import { - StyleRulesCallback, WithStyles, withStyles, Grid -} from '@material-ui/core'; +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'; @@ -23,18 +20,18 @@ 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, ResourceOwner, ResourceLastModifiedDate } from '~/views-components/data-explorer/renderers'; +import { ResourceName, ResourceOwnerName, ResourceLastModifiedDate } from '~/views-components/data-explorer/renderers'; type CssRules = 'backLink' | 'backIcon' | 'card' | 'title' | 'iconHeader' | 'link'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ backLink: { - fontSize: '1rem', + fontSize: '14px', fontWeight: 600, display: 'flex', alignItems: 'center', - textDecoration: 'none', padding: theme.spacing.unit, + marginBottom: theme.spacing.unit, color: theme.palette.grey["700"], }, backIcon: { @@ -62,7 +59,7 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ enum CollectionContentAddressPanelColumnNames { COLLECTION_WITH_THIS_ADDRESS = "Collection with this address", - OWNER = "Owner", + LOCATION = "Location", LAST_MODIFIED = "Last modified" } @@ -76,11 +73,11 @@ export const collectionContentAddressPanelColumns: DataColumns = [ render: uuid => }, { - name: CollectionContentAddressPanelColumnNames.OWNER, + name: CollectionContentAddressPanelColumnNames.LOCATION, selected: true, configurable: true, filters: createTree(), - render: uuid => + render: uuid => }, { name: CollectionContentAddressPanelColumnNames.LAST_MODIFIED, @@ -92,13 +89,13 @@ export const collectionContentAddressPanelColumns: DataColumns = [ } ]; -export interface CollectionContentAddressMainCardActionProps { +export interface CollectionContentAddressPanelActionProps { onContextMenu: (event: React.MouseEvent, uuid: string) => void; onItemClick: (item: string) => void; onItemDoubleClick: (item: string) => void; } -const mapDispatchToProps = (dispatch: Dispatch): CollectionContentAddressMainCardActionProps => ({ +const mapDispatchToProps = (dispatch: Dispatch): CollectionContentAddressPanelActionProps => ({ onContextMenu: (event, resourceUuid) => { const isAdmin = dispatch(getIsAdmin()); const kind = resourceKindToContextMenuKind(resourceUuid, isAdmin); @@ -121,21 +118,30 @@ const mapDispatchToProps = (dispatch: Dispatch): CollectionContentAddressMainCar } }); +interface CollectionContentAddressDataProps { + match: { + params: { id: string } + }; +} + export const CollectionsContentAddressPanel = withStyles(styles)( connect(null, mapDispatchToProps)( - class extends React.Component> { + class extends React.Component> { render() { return - {/* +