From 056e5b954c34946428c2b9fcbc3c49c2670ec305 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Wed, 18 May 2022 15:17:51 -0400 Subject: [PATCH] 19069: Add workflow details Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- src/models/workflow.ts | 2 +- .../workflow-description-card.tsx | 55 ++++++++++++++++--- 2 files changed, 47 insertions(+), 10 deletions(-) diff --git a/src/models/workflow.ts b/src/models/workflow.ts index 00dfaa10..6d21dbc7 100644 --- a/src/models/workflow.ts +++ b/src/models/workflow.ts @@ -153,7 +153,7 @@ export const getWorkflowInputs = (workflowDefinition: WorkflowResourceDefinition }; export const getInputLabel = (input: CommandInputParameter) => { - return `${input.label || input.id}`; + return `${input.label || input.id.split('/').pop()}`; }; export const isRequiredInput = ({ type }: CommandInputParameter) => { diff --git a/src/views/workflow-panel/workflow-description-card.tsx b/src/views/workflow-panel/workflow-description-card.tsx index 9c1d81c3..c6c146ac 100644 --- a/src/views/workflow-panel/workflow-description-card.tsx +++ b/src/views/workflow-panel/workflow-description-card.tsx @@ -14,13 +14,17 @@ import { TableHead, TableCell, TableBody, - TableRow + TableRow, + Grid, } 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, parseWorkflowDefinition, getWorkflowInputs, getInputLabel, stringifyInputType } from 'models/workflow'; -import { WorkflowGraph } from "views/workflow-panel/workflow-graph"; +// import { WorkflowGraph } from "views/workflow-panel/workflow-graph"; +import { DetailsAttribute } from 'components/details-attribute/details-attribute'; +import { ResourceOwnerWithName } from 'views-components/data-explorer/renderers'; +import { formatDate } from "common/formatters"; export type CssRules = 'root' | 'tab' | 'inputTab' | 'graphTab' | 'graphTabWithChosenWorkflow' | 'descriptionTab' | 'inputsTable'; @@ -77,16 +81,17 @@ export const WorkflowDetailsCard = withStyles(styles)( - + + {/* */} {value === 0 && {workflow ?
{workflow.description}
: ( - - )} + + )}
} {value === 1 && {workflow @@ -96,12 +101,20 @@ export const WorkflowDetailsCard = withStyles(styles)( messages={['Please select a workflow to see its inputs.']} /> } } + {/* {value === 2 && + {workflow + ? + : + } + } */} {value === 2 && {workflow - ? + ? : + messages={['Please select a workflow to see its details.']} /> } } ; @@ -137,3 +150,27 @@ export const WorkflowDetailsCard = withStyles(styles)( ; } }); + +export const WorkflowDetailsAttributes = ({ workflow }: WorkflowDetailsCardDataProps) => { + return + + + } /> + + + + + + + + + } /> + + ; +}; -- 2.30.2