refactor
authorPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Tue, 28 Aug 2018 16:30:31 +0000 (18:30 +0200)
committerPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Tue, 28 Aug 2018 16:30:31 +0000 (18:30 +0200)
Feature #13858

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

src/components/details-attribute/details-attribute.tsx
src/views-components/context-menu/action-sets/process-action-set.ts
src/views/process-panel/information-card.tsx
src/views/process-panel/process-panel.tsx

index 8794b1585bf595a159d0034ba39a08a518bd694e..4a94dc30d3f778a9a559631ada8026c93f561c68 100644 (file)
@@ -33,14 +33,15 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
         width: '60%',
         color: theme.palette.primary.main,
         textDecoration: 'none',
-        overflowWrap: 'break-word'
+        overflowWrap: 'break-word',
+        cursor: 'pointer'
     }
 });
 
 interface DetailsAttributeDataProps {
     label: string;
     classLabel?: string;
-    value?: any;
+    value?: string | number;
     classValue?: string;
     lowercaseValue?: boolean;
     link?: string;
index 1d94170bab893483c1dab31388361ec29f53c01d..5d679f52b04e4e89d845acfe61ecbda504c4dea6 100644 (file)
@@ -55,6 +55,24 @@ export const processActionSet: ContextMenuActionSet = [[
             // add code
         }
     },
+    {
+        name: "Inputs",
+        execute: (dispatch, resource) => {
+            // add code
+        }
+    },
+    {
+        name: "Outputs",
+        execute: (dispatch, resource) => {
+            // add code
+        }
+    },
+    {
+        name: "Command",
+        execute: (dispatch, resource) => {
+            // add code
+        }
+    },
     {
         icon: DetailsIcon,
         name: "View details",
index 467f7278fda1214e61022d14c85422d77473e1be..22e08d2c93725d23665d3d6e6060163945da2722 100644 (file)
@@ -66,13 +66,13 @@ interface ProcessInformationCardDataProps {
     item: ProcessResource;
 }
 
-type InformationCardProps = ProcessInformationCardDataProps & DispatchProp & WithStyles<CssRules>;
+type ProcessInformationCardProps = ProcessInformationCardDataProps & DispatchProp & WithStyles<CssRules>;
 
-export const InformationCard = withStyles(styles)(
+export const ProcessInformationCard = withStyles(styles)(
     connect((state: RootState) => ({
         item: state.collectionPanel.item
     }))(
-        class extends React.Component<InformationCardProps> {
+        class extends React.Component<ProcessInformationCardProps> {
             render() {
                 const { classes } = this.props;
 
@@ -100,10 +100,8 @@ export const InformationCard = withStyles(styles)(
                                         label='Workflow' value='FastQC MultiQC' />
                                 </Grid>
                                 <Grid item xs={6}>
-                                    <DetailsAttribute classLabel={classes.link} classValue={classes.value}
-                                        label='Outputs' />
-                                    <DetailsAttribute classLabel={classes.link} classValue={classes.value}
-                                        label='Inputs' />
+                                    <DetailsAttribute classLabel={classes.link} label='Outputs' />
+                                    <DetailsAttribute classLabel={classes.link} label='Inputs' />
                                 </Grid>
                             </Grid>
                         </CardContent>
index a8c92b72ea94ab29c17373c8476b0428180fa083..ce98a4880b1ac337a9ef6a2a3a5778d3dc318443 100644 (file)
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from 'react';
-import { InformationCard } from '~/views/process-panel/information-card';
+import { ProcessInformationCard } from '~/views/process-panel/information-card';
 import { Grid } from '@material-ui/core';
 
 export class ProcessPanel extends React.Component {
@@ -11,7 +11,7 @@ export class ProcessPanel extends React.Component {
         return <div>
             <Grid container>
                 <Grid item xs={7}>
-                    <InformationCard />
+                    <ProcessInformationCard />
                 </Grid>
             </Grid>
         </div>;