1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from "react";
6 import { CustomStyleRulesCallback } from 'common/custom-theme';
7 import { Table, TableHead, TableCell, TableRow, TableBody, WithStyles, withStyles } from '@material-ui/core';
9 type CssRules = 'cell';
11 const styles: CustomStyleRulesCallback<CssRules> = theme => ({
13 paddingRight: theme.spacing.unit * 2
17 interface MetadataTable {
26 interface MetadataProps {
27 items: MetadataTable[];
31 export const MetadataTab = withStyles(styles)((props: MetadataProps & WithStyles<CssRules>) =>
35 <TableCell>uuid</TableCell>
36 <TableCell>link_class</TableCell>
37 <TableCell>name</TableCell>
38 <TableCell>tail</TableCell>
39 <TableCell>head</TableCell>
40 <TableCell>properties</TableCell>
44 {props.items.map((it, index) =>
45 <TableRow key={index}>
46 <TableCell className={props.classes.cell}>{it.uuid}</TableCell>
47 <TableCell className={props.classes.cell}>{it.linkClass}</TableCell>
48 <TableCell className={props.classes.cell}>{it.name}</TableCell>
49 <TableCell className={props.classes.cell}>{it.tailUuid}</TableCell>
50 <TableCell className={props.classes.cell}>{it.headUuid === props.uuid ? 'this' : it.headUuid}</TableCell>
51 <TableCell className={props.classes.cell}>{JSON.stringify(it.properties)}</TableCell>