1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from 'react';
6 import { Stepper, Step, StepLabel, StepContent, StyleRulesCallback, withStyles, WithStyles } from '@material-ui/core';
7 import { RunProcessFirstStepDataProps, RunProcessFirstStepActionProps, RunProcessFirstStep } from 'views/run-process-panel/run-process-first-step';
8 import { RunProcessSecondStepForm } from './run-process-second-step';
10 export type RunProcessPanelRootDataProps = {
12 } & RunProcessFirstStepDataProps;
14 export type RunProcessPanelRootActionProps = RunProcessFirstStepActionProps & {
15 runProcess: () => void;
18 type RunProcessPanelRootProps = RunProcessPanelRootDataProps & RunProcessPanelRootActionProps;
20 type CssRules = 'stepper';
22 const styles: StyleRulesCallback<CssRules> = theme => ({
28 export const RunProcessPanelRoot = withStyles(styles)(
29 ({ runProcess, currentStep, onSearch, onSetStep, onSetWorkflow, workflows, selectedWorkflow, classes }: WithStyles<CssRules> & RunProcessPanelRootProps) =>
30 <Stepper activeStep={currentStep} orientation="vertical" elevation={2} className={classes.stepper}>
32 <StepLabel>Choose a workflow</StepLabel>
36 selectedWorkflow={selectedWorkflow}
39 onSetWorkflow={onSetWorkflow} />
43 <StepLabel>Select inputs</StepLabel>
45 <RunProcessSecondStepForm
46 goBack={() => onSetStep(0)}
47 runProcess={runProcess} />