X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a9ba50241080a83734e8aea0f230cc3fc3f3b7ca..428d454e2681d66bb14558946cfe2fb77a2c8dce:/src/views/workflow-panel/workflow-description-card.tsx?ds=sidebyside

diff --git a/src/views/workflow-panel/workflow-description-card.tsx b/src/views/workflow-panel/workflow-description-card.tsx
index 60e17b6017..c297276e7b 100644
--- a/src/views/workflow-panel/workflow-description-card.tsx
+++ b/src/views/workflow-panel/workflow-description-card.tsx
@@ -7,7 +7,9 @@ import { StyleRulesCallback, WithStyles, withStyles, CardContent, Tab, Tabs, Pap
 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';
+import { WorkflowInput } from '~/components/workflow-inputs-form/workflow-input';
+import { RunProcessInputsForm } from '../run-process-panel/run-process-inputs-form';
 
 export type CssRules = 'root' | 'tab';
 
@@ -37,7 +39,7 @@ export const WorkflowDetailsCard = withStyles(styles)(
         }
 
         render() {
-            const { classes } = this.props;
+            const { classes, workflow } = this.props;
             const { value } = this.state;
             return <Paper className={classes.root}>
                 <Tabs value={value} onChange={this.handleChange} centered={true}>
@@ -45,14 +47,29 @@ export const WorkflowDetailsCard = withStyles(styles)(
                     <Tab className={classes.tab} label="Inputs" />
                 </Tabs>
                 {value === 0 && <CardContent>
-                    Description
-                    <DataTableDefaultView
-                        icon={WorkflowIcon}
-                        messages={['Please select a workflow to see its description.']} />
+                    {workflow
+                        ? workflow.description
+                        : <DataTableDefaultView
+                            icon={WorkflowIcon}
+                            messages={['Please select a workflow to see its description.']} />}
                 </CardContent>}
                 {value === 1 && <CardContent>
-                    Inputs
+                    {workflow && this.inputs
+                        ? <RunProcessInputsForm inputs={this.inputs} />
+                        : <DataTableDefaultView
+                            icon={WorkflowIcon}
+                            messages={['Please select a workflow to see its description.']} />}
                 </CardContent>}
             </Paper>;
         }
+
+        get inputs() {
+            if (this.props.workflow) {
+                const definition = parseWorkflowDefinition(this.props.workflow);
+                if (definition) {
+                    return getWorkflowInputs(definition);
+                }
+            }
+            return;
+        }
     });
\ No newline at end of file
