// 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';
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<CssRules> = (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: {
selected: true,
configurable: true,
filters: createTree(),
- render: uuid => <ResourceOwner uuid={uuid} />
+ render: uuid => <ResourceOwnerName uuid={uuid} />
},
{
name: CollectionContentAddressPanelColumnNames.LAST_MODIFIED,
}
});
+interface CollectionContentAddressDataProps {
+ match: {
+ params: { id: string }
+ };
+}
+
export const CollectionsContentAddressPanel = withStyles(styles)(
connect(null, mapDispatchToProps)(
- class extends React.Component<CollectionContentAddressPanelActionProps & WithStyles<CssRules>> {
+ class extends React.Component<CollectionContentAddressPanelActionProps & CollectionContentAddressDataProps & WithStyles<CssRules>> {
render() {
return <Grid item xs={12}>
- {/* <Link to={`/collections/${collectionUuid}`} className={this.props.classes.backLink}>
+ <Button
+ onClick={() => history.back()}
+ className={this.props.classes.backLink}>
<BackIcon className={this.props.classes.backIcon} />
Back
- </Link> */}
+ </Button>
<DataExplorer
id={COLLECTIONS_CONTENT_ADDRESS_PANEL_ID}
onRowClick={this.props.onItemClick}
onRowDoubleClick={this.props.onItemDoubleClick}
onContextMenu={this.props.onContextMenu}
contextMenuColumn={true}
+ title={`Content address: ${this.props.match.params.id}`}
dataTableDefaultView={
<DataTableDefaultView
icon={CollectionIcon}
}
}
)
-);
\ No newline at end of file
+);