// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import * as React from "react"; import { Table, TableHead, TableCell, TableRow, TableBody, StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core'; import { UserResource, getUserDisplayName } from "~/models/user"; type CssRules = 'cell'; const styles: StyleRulesCallback = theme => ({ cell: { paddingRight: theme.spacing.unit * 2 } }); interface MetadataTable { uuid: string; linkClass: string; name: string; tailUuid: string; headUuid: string; properties: any; } interface MetadataProps { items: MetadataTable[]; user: UserResource; uuid: string; } export const MetadataTab = withStyles(styles)((props: MetadataProps & WithStyles) => uuid link_class name tail head properties {props.items.map((it, index) => {it.uuid} {it.linkClass} {it.name} {props.user && `User: ${getUserDisplayName(props.user)}`} {it.headUuid === props.uuid ? 'this' : it.headUuid} {JSON.stringify(it.properties)} )}
);