init metadata
authorPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Tue, 30 Oct 2018 09:04:25 +0000 (10:04 +0100)
committerPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Tue, 30 Oct 2018 09:04:25 +0000 (10:04 +0100)
Feature #13969

Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>

src/views-components/advanced-tab-dialog/metadataTab.tsx

index eea438d7e8793478b31c9a4a2868e635106c4b70..f8386fd24f590d1efe1696e988f4ec154d951c25 100644 (file)
@@ -4,6 +4,7 @@
 
 import * as 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';
 
@@ -17,8 +18,8 @@ interface MetadataTable {
     uuid: string;
     linkClass: string;
     name: string;
-    tail: string;
-    head: string;
+    tailUuid: string;
+    headUuid: string;
     properties: any;
 }
 
@@ -26,7 +27,6 @@ interface MetadataProps {
     items: MetadataTable[];
 }
 
-
 export const MetadataTab = withStyles(styles)((props: MetadataProps & WithStyles<CssRules>) =>
     <Table>
         <TableHead>
@@ -40,21 +40,18 @@ export const MetadataTab = withStyles(styles)((props: MetadataProps & WithStyles
             </TableRow>
         </TableHead>
         <TableBody>
-            {props.items.map((it: any, index: number) => {
+            {props.items.map((it: MetadataTable, index: number) => {
                 return (
                     <TableRow key={index}>
-                        {tableCell(it.uuid, props.classes)}
-                        {tableCell(it.linkClass, props.classes)}
-                        {tableCell(it.name, props.classes)}
-                        {tableCell(it.tailUuid, props.classes)}
-                        {tableCell(it.headUuid, props.classes)}
-                        {tableCell(JSON.stringify(it.properties, null, 2), props.classes)}
+                        <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>
                 );
             })}
         </TableBody>
     </Table>
-);
-
-const tableCell = (value: string, classes: any) =>
-    <TableCell className={classes.cell}>{value}</TableCell>;
\ No newline at end of file
+);
\ No newline at end of file