2960: Merge branch 'main' into 2960-keepstore-streaming
[arvados.git] / services / workbench2 / src / views / workflow-panel / registered-workflow-panel.tsx
index 5973efedc8fe0626e10cd13ad5465e36baab79f4..aa4c1b29d430538d4fdab7fcf574e1e14030f74e 100644 (file)
@@ -12,7 +12,7 @@ import {
     Card,
     CardHeader,
     CardContent,
-    IconButton,
+    IconButton
 } from '@material-ui/core';
 import { connect, DispatchProp } from "react-redux";
 import { RouteComponentProps } from 'react-router';
@@ -26,6 +26,8 @@ import { getResource } from 'store/resources/resources';
 import { openContextMenu, resourceUuidToContextMenuKind } from 'store/context-menu/context-menu-actions';
 import { MPVContainer, MPVPanelContent, MPVPanelState } from 'components/multi-panel-view/multi-panel-view';
 import { ProcessIOCard, ProcessIOCardType } from 'views/process-panel/process-io-card';
+import { NotFoundView } from 'views/not-found-panel/not-found-panel';
+import { WorkflowProcessesPanel } from './workflow-processes-panel';
 
 type CssRules = 'root'
     | 'button'
@@ -134,9 +136,10 @@ export const RegisteredWorkflowPanel = withStyles(styles)(connect(
                 const { classes, item, inputParams, outputParams, workflowCollection } = this.props;
                 const panelsData: MPVPanelState[] = [
                     { name: "Details" },
-                    { name: "Inputs" },
+                    { name: "Runs" },
                     { name: "Outputs" },
-                    { name: "Files" },
+                    { name: "Inputs" },
+                    { name: "Definition" },
                 ];
                 return item
                     ? <MPVContainer className={classes.root} spacing={8} direction="column" justify-content="flex-start" wrap="nowrap" panelStates={panelsData}>
@@ -178,29 +181,37 @@ export const RegisteredWorkflowPanel = withStyles(styles)(connect(
                                 </CardContent>
                             </Card>
                         </MPVPanelContent>
-                        <MPVPanelContent forwardProps xs data-cy="process-inputs">
+                        <MPVPanelContent forwardProps xs maxHeight="100%">
+                            <WorkflowProcessesPanel />
+                        </MPVPanelContent>
+                        <MPVPanelContent forwardProps xs data-cy="process-outputs" maxHeight="100%">
                             <ProcessIOCard
-                                label={ProcessIOCardType.INPUT}
-                                params={inputParams}
+                                label={ProcessIOCardType.OUTPUT}
+                                params={outputParams}
                                 raw={{}}
-                                showParams={true}
+                                forceShowParams={true}
                             />
                         </MPVPanelContent>
-                        <MPVPanelContent forwardProps xs data-cy="process-outputs">
+                        <MPVPanelContent forwardProps xs data-cy="process-inputs" maxHeight="100%">
                             <ProcessIOCard
-                                label={ProcessIOCardType.OUTPUT}
-                                params={outputParams}
+                                label={ProcessIOCardType.INPUT}
+                                params={inputParams}
                                 raw={{}}
-                                showParams={true}
+                                forceShowParams={true}
                             />
                         </MPVPanelContent>
-                        <MPVPanelContent xs>
+                        <MPVPanelContent xs maxHeight="100%">
                             <Card className={classes.filesCard}>
+                                <CardHeader title="Workflow Definition" />
                                 <ProcessOutputCollectionFiles isWritable={false} currentItemUuid={workflowCollection} />
                             </Card>
                         </MPVPanelContent>
                     </MPVContainer>
-                    : null;
+                    :
+                    <NotFoundView
+                        icon={WorkflowIcon}
+                        messages={["Workflow not found"]}
+                    />
             }
 
             handleContextMenu = (event: React.MouseEvent<any>) => {