19093: Use paper instead of expansionpanel for process retry warning
[arvados-workbench2.git] / src / views-components / advanced-tab-dialog / metadataTab.tsx
index 340149a3e97b38bb787651df5ea63c83b5ae799b..1b950d242f1f5989401df72bf180101ff920aba2 100644 (file)
@@ -2,9 +2,8 @@
 //
 // 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 { navigateTo } from "~/store/navigation/navigation-action";
 
 type CssRules = 'cell';
 
@@ -25,6 +24,7 @@ interface MetadataTable {
 
 interface MetadataProps {
     items: MetadataTable[];
+    uuid: string;
 }
 
 export const MetadataTab = withStyles(styles)((props: MetadataProps & WithStyles<CssRules>) =>
@@ -40,18 +40,16 @@ export const MetadataTab = withStyles(styles)((props: MetadataProps & WithStyles
             </TableRow>
         </TableHead>
         <TableBody>
-            {props.items.map((it, index) => {
-                return (
-                    <TableRow key={index}>
-                        <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}>{it.tailUuid}</TableCell>
-                        <TableCell className={props.classes.cell}>{it.headUuid}</TableCell>
-                        <TableCell className={props.classes.cell}>{JSON.stringify(it.properties, null, 2)}</TableCell>
-                    </TableRow>
-                );
-            })}
+            {props.items.map((it, index) =>
+                <TableRow key={index}>
+                    <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}>{it.tailUuid}</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>
     </Table>
 );
\ No newline at end of file