19079: Add search results context menu with clipboard and new tab options
[arvados-workbench2.git] / src / views-components / advanced-tab-dialog / metadataTab.tsx
index 788b10d3a01ca26e4a311f0cda71c4088ae55db4..1b950d242f1f5989401df72bf180101ff920aba2 100644 (file)
@@ -2,7 +2,7 @@
 //
 // 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';
 
 type CssRules = 'cell';
@@ -24,6 +24,7 @@ interface MetadataTable {
 
 interface MetadataProps {
     items: MetadataTable[];
+    uuid: string;
 }
 
 export const MetadataTab = withStyles(styles)((props: MetadataProps & WithStyles<CssRules>) =>
@@ -45,8 +46,8 @@ export const MetadataTab = withStyles(styles)((props: MetadataProps & WithStyles
                     <TableCell className={props.classes.cell}>{it.linkClass}</TableCell>
                     <TableCell className={props.classes.cell}>{it.name}</TableCell>
                     <TableCell className={props.classes.cell}>{it.tailUuid}</TableCell>
-                    <TableCell className={props.classes.cell}>{it.headUuid}</TableCell>
-                    <TableCell className={props.classes.cell}>{JSON.stringify(it.properties, null, 2)}</TableCell>
+                    <TableCell className={props.classes.cell}>{it.headUuid === props.uuid ? 'this' : it.headUuid}</TableCell>
+                    <TableCell className={props.classes.cell}>{JSON.stringify(it.properties)}</TableCell>
                 </TableRow>
             )}
         </TableBody>