merge barnch 'master'
[arvados-workbench2.git] / src / views / workflow-panel / workflow-description-card.tsx
index c591217afe03380ca769d3af207c629b2d1d0c22..146236269a19681f2320c129b6e3c596d9052d90 100644 (file)
@@ -3,11 +3,11 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from 'react';
-import { StyleRulesCallback, WithStyles, withStyles, CardContent, Tab, Tabs, Paper } from '@material-ui/core';
+import { StyleRulesCallback, WithStyles, withStyles, CardContent, Tab, Tabs } from '@material-ui/core';
 import { ArvadosTheme } from '~/common/custom-theme';
 import { WorkflowIcon } from '~/components/icon/icon';
 import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view';
-import { WorkflowResource } from '~/models/workflow';
+import { WorkflowResource, parseWorkflowDefinition, getWorkflowInputs } from '~/models/workflow';
 
 export type CssRules = 'root' | 'tab';
 
@@ -59,9 +59,19 @@ export const WorkflowDetailsCard = withStyles(styles)(
                     ) : (
                         <DataTableDefaultView
                             icon={WorkflowIcon}
-                            messages={['Please select a workflow to see its inpust.']} />
+                            messages={['Please select a workflow to see its inputs.']} />
                     )}
                 </CardContent>}
             </div>;
         }
+
+        get inputs() {
+            if (this.props.workflow) {
+                const definition = parseWorkflowDefinition(this.props.workflow);
+                if (definition) {
+                    return getWorkflowInputs(definition);
+                }
+            }
+            return;
+        }
     });
\ No newline at end of file