cy.get('[data-cy=side-panel-button]').click();
- cy.get('#aside-menu-list').contains('Run a process').click();
+ cy.get('#aside-menu-list').contains('Run a workflow').click();
cy.get('@testWorkflow')
.then((testWorkflow) => {
cy.get('main').contains(testWorkflow.name).click();
cy.get('[data-cy=run-process-next-button]').click();
- cy.get('label').contains('#main/foo').parent('div').find('input').click();
+ cy.get('label').contains('foo').parent('div').find('input').click();
cy.get('div[role=dialog]')
.within(() => {
cy.get('p').contains('Projects').closest('div[role=button]')
cy.get('[data-cy=ok-button]').click();
});
- cy.get('label').contains('#main/bar').parent('div').find('input').click();
+ cy.get('label').contains('bar').parent('div').find('input').click();
cy.get('div[role=dialog]')
.within(() => {
cy.get('p').contains('Projects').closest('div[role=button]')
});
});
- cy.get('label').contains('#main/foo').parent('div')
+ cy.get('label').contains('foo').parent('div')
.within(() => {
cy.contains('baz');
cy.contains('bar');
});
- cy.get('label').contains('#main/bar').parent('div')
+ cy.get('label').contains('bar').parent('div')
.within(() => {
cy.contains(testCollection.name);
cy.contains(testCollection2.name);
cy.get('[data-cy=side-panel-button]').click();
- cy.get('#aside-menu-list').contains('Run a process').click();
+ cy.get('#aside-menu-list').contains('Run a workflow').click();
cy.get('@testWorkflow')
.then((testWorkflow) => {
{url: '/shared-with-me', label: 'Shared with me'},
{url: '/public-favorites', label: 'Public Favorites'},
{url: '/favorites', label: 'My Favorites'},
- {url: '/workflows', label: 'Workflows'},
+ // {url: '/workflows', label: 'Workflows'},
{url: '/all_processes', label: 'All Processes'},
{url: '/trash', label: 'Trash'},
].map(function(section) {
export const getWorkflow = (workflowDefinition: WorkflowResourceDefinition) => {
if (!workflowDefinition.$graph) { return undefined; }
- const mainWorkflow = workflowDefinition.$graph.find(item => item.class === 'Workflow' && item.id === '#main');
+ const mainWorkflow = workflowDefinition.$graph.find(item => item.id === '#main');
return mainWorkflow
? mainWorkflow
: undefined;
};
export const getInputLabel = (input: CommandInputParameter) => {
- return `${input.label || input.id}`;
+ return `${input.label || input.id.split('/').pop()}`;
};
export const isRequiredInput = ({ type }: CommandInputParameter) => {
name: res.name,
description: res.description,
outputUuid: res.outputUuid || '',
- workflowUuid: res.properties.workflowUuid || '',
+ workflowUuid: res.properties.template_uuid || '',
menuKind: ContextMenuKind.PROCESS_RESOURCE
}));
}
description: "basicFormTestDescription",
mounts: undefined,
name: "basicFormTestName",
- outputName: undefined,
+ outputName: "Output from basicFormTestName",
outputPath: "/var/spool/cwl",
ownerUuid: "ce8i5-tpzed-yid70bw31f51234",
priority: 1,
properties: {
workflowName: "revsort.cwl",
- workflowUuid: "ce8i5-7fd4e-2tlnerdkxnl4fjt",
+ template_uuid: "ce8i5-7fd4e-2tlnerdkxnl4fjt",
},
runtimeConstraints: {
API: true,
dispatch(runProcessPanelActions.SET_STEP_CHANGED(false));
dispatch(runProcessPanelActions.SET_SELECTED_WORKFLOW(workflow));
dispatch<any>(loadPresets(workflow.uuid));
+ dispatch(initialize(RUN_PROCESS_BASIC_FORM, { name: workflow.name }));
dispatch(initialize(RUN_PROCESS_ADVANCED_FORM, advancedFormValues));
}
if (!isWorkflowChanged) {
dispatch(runProcessPanelActions.SET_SELECTED_WORKFLOW(workflow));
dispatch<any>(loadPresets(workflow.uuid));
+ dispatch(initialize(RUN_PROCESS_BASIC_FORM, { name: workflow.name }));
dispatch(initialize(RUN_PROCESS_ADVANCED_FORM, advancedFormValues));
}
};
],
outputPath: '/var/spool/cwl',
priority: 1,
- outputName: advancedForm[OUTPUT_FIELD] ? advancedForm[OUTPUT_FIELD] : undefined,
+ outputName: advancedForm[OUTPUT_FIELD] ? advancedForm[OUTPUT_FIELD] : `Output from ${basicForm.name}`,
properties: {
- workflowUuid: selectedWorkflow.uuid,
+ template_uuid: selectedWorkflow.uuid,
workflowName: selectedWorkflow.name
},
useExisting: false
SidePanelTreeCategory.SHARED_WITH_ME,
SidePanelTreeCategory.PUBLIC_FAVORITES,
SidePanelTreeCategory.FAVORITES,
- SidePanelTreeCategory.WORKFLOWS,
+ // SidePanelTreeCategory.WORKFLOWS,
SidePanelTreeCategory.GROUPS,
SidePanelTreeCategory.ALL_PROCESSES,
SidePanelTreeCategory.TRASH
<CollectionIcon className={classes.icon} /> New collection
</MenuItem>
<MenuItem data-cy='side-panel-run-process' className={classes.menuItem} onClick={this.handleRunProcessClick}>
- <ProcessIcon className={classes.icon} /> Run a process
+ <ProcessIcon className={classes.icon} /> Run a workflow
</MenuItem>
<MenuItem data-cy='side-panel-new-project' className={classes.menuItem} onClick={this.handleNewProjectClick}>
<ProjectIcon className={classes.icon} /> New project
</Grid>
<Grid item xs={12} md={mdSize}>
<DetailsAttribute label='Docker Image locator'
- linkToUuid={containerRequest.containerImage} value={containerRequest.containerImage} />
+ linkToUuid={containerRequest.containerImage} value={containerRequest.containerImage} />
</Grid>
<Grid item xs={12} md={mdSize}>
<DetailsAttribute
<DetailsAttribute label='Container UUID' value={containerRequest.containerUuid} />
</Grid>
{!props.hideProcessPanelRedundantFields && <Grid item xs={12} md={mdSize}>
- <DetailsAttribute label='Status' value={getProcessStatus({containerRequest, container})} />
+ <DetailsAttribute label='Status' value={getProcessStatus({ containerRequest, container })} />
</Grid>}
<Grid item xs={12} md={mdSize}>
<DetailsAttribute label='Created at' value={formatDate(containerRequest.createdAt)} />
<DetailsAttribute classLabel={classes.link} label='Inputs' />
</span>
</Grid>
- {containerRequest.properties.workflowUuid &&
- <Grid item xs={12} md={mdSize}>
- <span onClick={() => props.openWorkflow(containerRequest.properties.workflowUuid)}>
- <DetailsAttribute classValue={classes.link}
- label='Workflow' value={containerRequest.properties.workflowName} />
- </span>
- </Grid>}
+ {containerRequest.properties.template_uuid &&
+ <Grid item xs={12} md={mdSize}>
+ <span onClick={() => props.openWorkflow(containerRequest.properties.template_uuid)}>
+ <DetailsAttribute classValue={classes.link}
+ label='Workflow' value={containerRequest.properties.workflowName} />
+ </span>
+ </Grid>}
<Grid item xs={12} md={mdSize}>
<DetailsAttribute label='Priority' value={containerRequest.priority} />
</Grid>
*/}
<Grid item xs={12} md={12}>
<DetailsAttribute label='Properties' />
- { Object.keys(containerRequest.properties).length > 0
+ {Object.keys(containerRequest.properties).length > 0
? Object.keys(containerRequest.properties).map(k =>
- Array.isArray(containerRequest.properties[k])
+ Array.isArray(containerRequest.properties[k])
? containerRequest.properties[k].map((v: string) =>
getPropertyChip(k, v, undefined, classes.propertyTag))
: getPropertyChip(k, containerRequest.properties[k], undefined, classes.propertyTag))
- : <div>No properties</div> }
+ : <div>No properties</div>}
</Grid>
</Grid>;
}
// SPDX-License-Identifier: AGPL-3.0
import React from 'react';
-import { Stepper, Step, StepLabel, StepContent } from '@material-ui/core';
+import { Stepper, Step, StepLabel, StepContent, StyleRulesCallback, withStyles, WithStyles } from '@material-ui/core';
import { RunProcessFirstStepDataProps, RunProcessFirstStepActionProps, RunProcessFirstStep } from 'views/run-process-panel/run-process-first-step';
import { RunProcessSecondStepForm } from './run-process-second-step';
type RunProcessPanelRootProps = RunProcessPanelRootDataProps & RunProcessPanelRootActionProps;
-export const RunProcessPanelRoot = ({ runProcess, currentStep, onSearch, onSetStep, onSetWorkflow, workflows, selectedWorkflow }: RunProcessPanelRootProps) =>
- <Stepper activeStep={currentStep} orientation="vertical" elevation={2}>
- <Step>
- <StepLabel>Choose a workflow</StepLabel>
- <StepContent>
- <RunProcessFirstStep
- workflows={workflows}
- selectedWorkflow={selectedWorkflow}
- onSearch={onSearch}
- onSetStep={onSetStep}
- onSetWorkflow={onSetWorkflow} />
- </StepContent>
- </Step>
- <Step>
- <StepLabel>Select inputs</StepLabel>
- <StepContent>
- <RunProcessSecondStepForm
- goBack={() => onSetStep(0)}
- runProcess={runProcess} />
- </StepContent>
- </Step>
- </Stepper>;
\ No newline at end of file
+type CssRules = 'stepper';
+
+const styles: StyleRulesCallback<CssRules> = theme => ({
+ stepper: {
+ overflow: "scroll",
+ }
+});
+
+export const RunProcessPanelRoot = withStyles(styles)(
+ ({ runProcess, currentStep, onSearch, onSetStep, onSetWorkflow, workflows, selectedWorkflow, classes }: WithStyles<CssRules> & RunProcessPanelRootProps) =>
+ <Stepper activeStep={currentStep} orientation="vertical" elevation={2} className={classes.stepper}>
+ <Step>
+ <StepLabel>Choose a workflow</StepLabel>
+ <StepContent>
+ <RunProcessFirstStep
+ workflows={workflows}
+ selectedWorkflow={selectedWorkflow}
+ onSearch={onSearch}
+ onSetStep={onSetStep}
+ onSetWorkflow={onSetWorkflow} />
+ </StepContent>
+ </Step>
+ <Step>
+ <StepLabel>Select inputs</StepLabel>
+ <StepContent>
+ <RunProcessSecondStepForm
+ goBack={() => onSetStep(0)}
+ runProcess={runProcess} />
+ </StepContent>
+ </Step>
+ </Stepper>);
({ inputs, workflow, selectedPreset, presets, onPresetChange, valid, goBack, runProcess }: RunProcessSecondStepFormProps) =>
<Grid container spacing={16} data-cy="new-process-panel">
<Grid item xs={12}>
- <Grid container spacing={32}>
+ {/* <Grid container spacing={32}>
<Grid item xs={12} md={6}>
- {workflow && selectedPreset && presets &&
- < WorkflowPresetSelect
- {...{ workflow, selectedPreset, presets, onChange: onPresetChange }} />
- }
+ {workflow && selectedPreset && presets &&
+ < WorkflowPresetSelect
+ {...{ workflow, selectedPreset, presets, onChange: onPresetChange }} />
+ }
</Grid>
- </Grid>
+ </Grid> */}
<RunProcessBasicForm />
<RunProcessInputsForm inputs={inputs} />
<RunProcessAdvancedForm />
TableHead,
TableCell,
TableBody,
- TableRow
+ TableRow,
+ Grid,
} 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 { WorkflowGraph } from "views/workflow-panel/workflow-graph";
+import { DetailsAttribute } from 'components/details-attribute/details-attribute';
+import { ResourceOwnerWithName } from 'views-components/data-explorer/renderers';
+import { formatDate } from "common/formatters";
export type CssRules = 'root' | 'tab' | 'inputTab' | 'graphTab' | 'graphTabWithChosenWorkflow' | 'descriptionTab' | 'inputsTable';
<Tabs value={value} onChange={this.handleChange} centered={true}>
<Tab className={classes.tab} label="Description" />
<Tab className={classes.tab} label="Inputs" />
- <Tab className={classes.tab} label="Graph" />
+ <Tab className={classes.tab} label="Details" />
+ {/* <Tab className={classes.tab} label="Graph" /> */}
</Tabs>
{value === 0 && <CardContent className={classes.descriptionTab}>
{workflow ? <div>
{workflow.description}
</div> : (
- <DataTableDefaultView
- icon={WorkflowIcon}
- messages={['Please select a workflow to see its description.']} />
- )}
+ <DataTableDefaultView
+ icon={WorkflowIcon}
+ messages={['Please select a workflow to see its description.']} />
+ )}
</CardContent>}
{value === 1 && <CardContent className={classes.inputTab}>
{workflow
messages={['Please select a workflow to see its inputs.']} />
}
</CardContent>}
- {value === 2 && <CardContent className={workflow ? classes.graphTabWithChosenWorkflow : classes.graphTab}>
+ {/* {value === 2 && <CardContent className={workflow ? classes.graphTabWithChosenWorkflow : classes.graphTab}>
+ {workflow
+ ? <WorkflowGraph workflow={workflow} />
+ : <DataTableDefaultView
+ icon={WorkflowIcon}
+ messages={['Please select a workflow to see its visualisation.']} />
+ }
+ </CardContent>} */}
+ {value === 2 && <CardContent className={classes.descriptionTab}>
{workflow
- ? <WorkflowGraph workflow={workflow} />
+ ? <WorkflowDetailsAttributes workflow={workflow} />
: <DataTableDefaultView
icon={WorkflowIcon}
- messages={['Please select a workflow to see its visualisation.']} />
+ messages={['Please select a workflow to see its details.']} />
}
</CardContent>}
</div>;
</Table>;
}
});
+
+export const WorkflowDetailsAttributes = ({ workflow }: WorkflowDetailsCardDataProps) => {
+ return <Grid container>
+ <Grid item xs={12} >
+ <DetailsAttribute
+ label={"Workflow UUID"}
+ linkToUuid={workflow?.uuid} />
+ </Grid>
+ <Grid item xs={12} >
+ <DetailsAttribute
+ label='Owner' linkToUuid={workflow?.ownerUuid}
+ uuidEnhancer={(uuid: string) => <ResourceOwnerWithName uuid={uuid} />} />
+ </Grid>
+ <Grid item xs={12}>
+ <DetailsAttribute label='Created at' value={formatDate(workflow?.createdAt)} />
+ </Grid>
+ <Grid item xs={12}>
+ <DetailsAttribute label='Last modified' value={formatDate(workflow?.modifiedAt)} />
+ </Grid>
+ <Grid item xs={12} >
+ <DetailsAttribute
+ label='Last modified by user' linkToUuid={workflow?.modifiedByUserUuid}
+ uuidEnhancer={(uuid: string) => <ResourceOwnerWithName uuid={uuid} />} />
+ </Grid>
+ </Grid >;
+};