1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from 'react';
6 import { reduxForm, Field } from 'redux-form';
7 import { Grid } from '@material-ui/core';
8 import { TextField } from 'components/text-field/text-field';
9 import { ProjectInput, ProjectCommandInputParameter } from 'views/run-process-panel/inputs/project-input';
10 import { PROCESS_NAME_VALIDATION } from 'validators/validators';
11 import { ProjectResource } from 'models/project';
12 import { UserResource } from 'models/user';
14 export const RUN_PROCESS_BASIC_FORM = 'runProcessBasicForm';
16 export interface RunProcessBasicFormData {
19 owner?: ProjectResource | UserResource;
22 export const RunProcessBasicForm =
23 reduxForm<RunProcessBasicFormData>({
24 form: RUN_PROCESS_BASIC_FORM
27 <Grid container spacing={32}>
28 <Grid item xs={12} md={6}>
31 component={TextField as any}
32 label="Name for this workflow run"
34 validate={PROCESS_NAME_VALIDATION} />
36 <Grid item xs={12} md={6}>
39 component={TextField as any}
40 label="Optional description of this workflow run" />
42 <Grid item xs={12} md={6}>
43 <ProjectInput required input={{
45 label: "Project where the workflow will run"
46 } as ProjectCommandInputParameter}
47 options={{ showOnlyOwned: false, showOnlyWritable: true }} />