X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/53782722a55ba35a658b5eca6206566462ab9fbd..08fb41e26f7227e85c56faf833918e94ebf8531e:/src/views/workflow-panel/workflow-description-card.tsx

diff --git a/src/views/workflow-panel/workflow-description-card.tsx b/src/views/workflow-panel/workflow-description-card.tsx
index c4db3fb9..2294ab5e 100644
--- a/src/views/workflow-panel/workflow-description-card.tsx
+++ b/src/views/workflow-panel/workflow-description-card.tsx
@@ -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';
+export type CssRules = 'root' | 'tab' | 'inputTab' | 'graphTab' | 'graphTabWithChosenWorkflow' | 'descriptionTab' | 'inputsTable';
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     root: {
@@ -33,13 +32,26 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
         minWidth: '33%'
     },
     inputTab: {
-        height: 'calc(100% - 48px - 16px * 2)',
-        overflowX: 'auto',
-        overflowY: 'hidden',
-        '&:last-child': {
-            paddingBottom: theme.spacing.unit / 2,
-        }
-    }
+        overflow: 'auto',
+        maxHeight: '300px',
+        marginTop: theme.spacing.unit
+    },
+    graphTab: {
+        marginTop: theme.spacing.unit,
+    },
+    graphTabWithChosenWorkflow: {
+        overflow: 'auto',
+        height: '450px',
+        marginTop: theme.spacing.unit,
+    },
+    descriptionTab: {
+        overflow: 'auto',
+        maxHeight: '300px',
+        marginTop: theme.spacing.unit,
+    },
+    inputsTable: {
+        tableLayout: 'fixed',
+    },
 });
 
 interface WorkflowDetailsCardDataProps {
@@ -67,7 +79,7 @@ export const WorkflowDetailsCard = withStyles(styles)(
                     <Tab className={classes.tab} label="Inputs" />
                     <Tab className={classes.tab} label="Graph" />
                 </Tabs>
-                {value === 0 && <CardContent>
+                {value === 0 && <CardContent className={classes.descriptionTab}>
                     {workflow ? <div>
                         {workflow.description}
                     </div> : (
@@ -84,9 +96,9 @@ 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}/>
+                        ? <WorkflowGraph workflow={workflow} />
                         : <DataTableDefaultView
                             icon={WorkflowIcon}
                             messages={['Please select a workflow to see its visualisation.']} />
@@ -106,7 +118,7 @@ export const WorkflowDetailsCard = withStyles(styles)(
         }
 
         renderInputsTable() {
-            return <Table>
+            return <Table className={this.props.classes.inputsTable}>
                 <TableHead>
                     <TableRow>
                         <TableCell>Label</TableCell>
