//
// SPDX-License-Identifier: AGPL-3.0
-import * as React from 'react';
+import React from 'react';
import {
StyleRulesCallback,
WithStyles,
TableBody,
TableRow
} 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 { 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";
-export type CssRules = 'root' | 'tab' | 'inputTab' | 'graphTab' | 'descriptionTab' | 'inputsTable';
+export type CssRules = 'root' | 'tab' | 'inputTab' | 'graphTab' | 'graphTabWithChosenWorkflow' | 'descriptionTab' | 'inputsTable';
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
root: {
inputTab: {
overflow: 'auto',
maxHeight: '300px',
- marginTop: theme.spacing.unit,
- '&:last-child': {
- paddingBottom: theme.spacing.unit / 2,
- }
+ marginTop: theme.spacing.unit
},
graphTab: {
+ marginTop: theme.spacing.unit,
+ },
+ graphTabWithChosenWorkflow: {
overflow: 'auto',
height: '450px',
marginTop: theme.spacing.unit,
render() {
const { classes, workflow } = this.props;
- if (workflow) {
- console.log(workflow.definition);
- }
const { value } = this.state;
return <div className={classes.root}>
<Tabs value={value} onChange={this.handleChange} centered={true}>
messages={['Please select a workflow to see its inputs.']} />
}
</CardContent>}
- {value === 2 && <CardContent className={classes.graphTab}>
+ {value === 2 && <CardContent className={workflow ? classes.graphTabWithChosenWorkflow : classes.graphTab}>
{workflow
? <WorkflowGraph workflow={workflow} />
: <DataTableDefaultView
return getWorkflowInputs(definition);
}
}
- return;
+ return undefined;
}
renderInputsTable() {