Merge branch '14684-image-file-preview-in-details-panel'
[arvados-workbench2.git] / src / views / workflow-panel / workflow-description-card.tsx
index 70fdb6b3b64d4a6477bfcb2eef178b547bb162e8..2294ab5e5373bb841bebac6752cf80c1a0d3da44 100644 (file)
@@ -14,8 +14,7 @@ import {
     TableHead,
     TableCell,
     TableBody,
-    TableRow,
-    Divider
+    TableRow
 } from '@material-ui/core';
 import { ArvadosTheme } from '~/common/custom-theme';
 import { WorkflowIcon } from '~/components/icon/icon';
@@ -23,7 +22,7 @@ import { DataTableDefaultView } from '~/components/data-table-default-view/data-
 import { WorkflowResource, parseWorkflowDefinition, getWorkflowInputs, getInputLabel, stringifyInputType } from '~/models/workflow';
 import { WorkflowGraph } from "~/views/workflow-panel/workflow-graph";
 
-export type CssRules = 'root' | 'tab' | 'inputTab' | 'descriptionTab' | 'inputsTable';
+export type CssRules = 'root' | 'tab' | 'inputTab' | 'graphTab' | 'graphTabWithChosenWorkflow' | 'descriptionTab' | 'inputsTable';
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     root: {
@@ -35,10 +34,15 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     inputTab: {
         overflow: 'auto',
         maxHeight: '300px',
+        marginTop: theme.spacing.unit
+    },
+    graphTab: {
+        marginTop: theme.spacing.unit,
+    },
+    graphTabWithChosenWorkflow: {
+        overflow: 'auto',
+        height: '450px',
         marginTop: theme.spacing.unit,
-        '&:last-child': {
-            paddingBottom: theme.spacing.unit / 2,
-        }
     },
     descriptionTab: {
         overflow: 'auto',
@@ -92,7 +96,7 @@ export const WorkflowDetailsCard = withStyles(styles)(
                             messages={['Please select a workflow to see its inputs.']} />
                     }
                 </CardContent>}
-                {value === 2 && <CardContent className={classes.inputTab}>
+                {value === 2 && <CardContent className={workflow ? classes.graphTabWithChosenWorkflow : classes.graphTab}>
                     {workflow
                         ? <WorkflowGraph workflow={workflow} />
                         : <DataTableDefaultView