TableHead,
TableCell,
TableBody,
- TableRow,
- Divider
+ TableRow
} from '@material-ui/core';
import { ArvadosTheme } from '~/common/custom-theme';
import { WorkflowIcon } from '~/components/icon/icon';
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: {
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 {
<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> : (
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.']} />
}
renderInputsTable() {
- return <Table>
+ return <Table className={this.props.classes.inputsTable}>
<TableHead>
<TableRow>
<TableCell>Label</TableCell>