merge barnch 'master'
[arvados-workbench2.git] / src / views / run-process-panel / run-process-panel-root.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import * as React from 'react';
6 import { Stepper, Step, StepLabel, StepContent } from '@material-ui/core';
7 import { RunProcessFirstStepDataProps, RunProcessFirstStepActionProps, RunProcessFirstStep } from '~/views/run-process-panel/run-process-first-step';
8 import { RunProcessSecondStepDataProps, RunProcessSecondStepActionProps, RunProcessSecondStepForm } from '~/views/run-process-panel/run-process-second-step';
9
10 export type RunProcessPanelRootDataProps = {
11     currentStep: number;
12 } & RunProcessFirstStepDataProps & RunProcessSecondStepDataProps;
13
14 export type RunProcessPanelRootActionProps = RunProcessFirstStepActionProps & RunProcessSecondStepActionProps;
15
16 type RunProcessPanelRootProps = RunProcessPanelRootDataProps & RunProcessPanelRootActionProps;
17
18 export const RunProcessPanelRoot = ({ currentStep, onSetStep, onRunProcess, onSetWorkflow, workflows, selectedWorkflow }: RunProcessPanelRootProps) =>
19     <Stepper activeStep={currentStep} orientation="vertical" elevation={2}>
20         <Step>
21             <StepLabel>Choose a workflow</StepLabel>
22             <StepContent>
23                 <RunProcessFirstStep 
24                     workflows={workflows}
25                     selectedWorkflow={selectedWorkflow}
26                     onSetStep={onSetStep} 
27                     onSetWorkflow={onSetWorkflow} />
28             </StepContent>
29         </Step>
30         <Step>
31             <StepLabel>Select inputs</StepLabel>
32             <StepContent>
33                 <RunProcessSecondStepForm />
34                 {/* <RunProcessSecondStep onSetStep={onSetStep} onRunProcess={onRunProcess} /> */}
35             </StepContent>
36         </Step>
37     </Stepper>;