Add toggleItemSelection callback
[arvados.git] / src / views / run-process-panel / run-process-advanced-form.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 { ExpansionPanel, ExpansionPanelDetails, ExpansionPanelSummary } from '@material-ui/core';
7 import { reduxForm, Field } from 'redux-form';
8 import { Grid } from '@material-ui/core';
9 import { TextField } from '~/components/text-field/text-field';
10 import { ExpandIcon } from '~/components/icon/icon';
11
12 export const RUN_PROCESS_ADVANCED_FORM = 'runProcessAdvancedForm';
13
14 export interface RunProcessAdvancedFormData {
15     output: string;
16     runtime: string;
17 }
18
19 export const RunProcessAdvancedForm =
20     reduxForm<RunProcessAdvancedFormData>({
21         form: RUN_PROCESS_ADVANCED_FORM
22     })(() =>
23         <form>
24             <ExpansionPanel elevation={0}>
25                 <ExpansionPanelSummary style={{ padding: 0 }} expandIcon={<ExpandIcon />}>
26                     Advanced
27                 </ExpansionPanelSummary>
28                 <ExpansionPanelDetails style={{ padding: 0 }}>
29                     <Grid container spacing={32}>
30                         <Grid item xs={12} md={6}>
31                             <Field
32                                 name='output'
33                                 component={TextField}
34                                 label="Output name" />
35                         </Grid>
36                         <Grid item xs={12} md={6}>
37                             <Field
38                                 name='runtime'
39                                 component={TextField}
40                                 label="Runtime limit (hh)" />
41                         </Grid>
42                     </Grid>
43                 </ExpansionPanelDetails>
44             </ExpansionPanel>
45         </form >);