18594: Added multiple tails display, added tests
[arvados-workbench2.git] / src / views-components / advanced-tab-dialog / metadataTab.tsx
index 2780ef81d0d5af2e0ad4a7cc929e11ef943ca56f..88d0137f8a7ede6a1df055a3250a8a10325e67e8 100644 (file)
@@ -2,9 +2,9 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from "react";
+import React from "react";
 import { Table, TableHead, TableCell, TableRow, TableBody, StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core';
-import { UserResource, getUserDisplayName } from "models/user";
+import { UserResource } from "models/user";
 
 type CssRules = 'cell';
 
@@ -47,9 +47,9 @@ export const MetadataTab = withStyles(styles)((props: MetadataProps & WithStyles
                     <TableCell className={props.classes.cell}>{it.uuid}</TableCell>
                     <TableCell className={props.classes.cell}>{it.linkClass}</TableCell>
                     <TableCell className={props.classes.cell}>{it.name}</TableCell>
-                    <TableCell className={props.classes.cell}>{props.user && `User: ${getUserDisplayName(props.user)}`}</TableCell>
+                    <TableCell className={props.classes.cell}>{it.properties.tail}</TableCell>
                     <TableCell className={props.classes.cell}>{it.headUuid === props.uuid ? 'this' : it.headUuid}</TableCell>
-                    <TableCell className={props.classes.cell}>{JSON.stringify(it.properties)}</TableCell>
+                    <TableCell className={props.classes.cell}>{JSON.stringify(it.properties, (key, value) => { return key === 'tail' ? undefined : value; })}</TableCell>
                 </TableRow>
             )}
         </TableBody>