X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/c47ae7ee3d75544d534b020e7e1c8c45e30f584e..33c03ae3c79936cc1a69129f07fba33fe2d28fd8:/src/views/run-process-panel/run-process-advanced-form.tsx

diff --git a/src/views/run-process-panel/run-process-advanced-form.tsx b/src/views/run-process-panel/run-process-advanced-form.tsx
index 5bec245a..d9848291 100644
--- a/src/views/run-process-panel/run-process-advanced-form.tsx
+++ b/src/views/run-process-panel/run-process-advanced-form.tsx
@@ -9,33 +9,30 @@ import { Grid } from '@material-ui/core';
 import { TextField } from '~/components/text-field/text-field';
 import { ExpandIcon } from '~/components/icon/icon';
 import * as IntInput from './inputs/int-input';
-import { require } from '~/validators/require';
 import { min } from '~/validators/min';
 import { optional } from '~/validators/optional';
 
 export const RUN_PROCESS_ADVANCED_FORM = 'runProcessAdvancedForm';
 
-const OUTPUT_FIELD = 'output';
-const RUNTIME_FIELD = 'runtime';
-const RAM_FIELD = 'ram';
-const VCPUS_FIELD = 'vcpus';
-const KEEP_CACHE_RAM_FIELD = 'keepCacheRam';
+export const OUTPUT_FIELD = 'output';
+export const RUNTIME_FIELD = 'runtime';
+export const RAM_FIELD = 'ram';
+export const VCPUS_FIELD = 'vcpus';
+export const KEEP_CACHE_RAM_FIELD = 'keep_cache_ram';
+export const RUNNER_IMAGE_FIELD = 'acr_container_image';
 
 export interface RunProcessAdvancedFormData {
     [OUTPUT_FIELD]?: string;
-    [RUNTIME_FIELD]?: string;
+    [RUNTIME_FIELD]?: number;
     [RAM_FIELD]: number;
     [VCPUS_FIELD]: number;
     [KEEP_CACHE_RAM_FIELD]?: number;
+    [RUNNER_IMAGE_FIELD]: string;
 }
 
 export const RunProcessAdvancedForm =
     reduxForm<RunProcessAdvancedFormData>({
         form: RUN_PROCESS_ADVANCED_FORM,
-        initialValues: {
-            [RAM_FIELD]: 1073741824,
-            [VCPUS_FIELD]: 1,
-        },
     })(() =>
         <form>
             <ExpansionPanel elevation={0}>
@@ -54,7 +51,12 @@ export const RunProcessAdvancedForm =
                             <Field
                                 name={RUNTIME_FIELD}
                                 component={TextField}
-                                label="Runtime limit (hh)" />
+                                helperText="Maximum running time (in seconds) that this container will be allowed to run before being cancelled."
+                                label="Runtime limit"
+                                parse={IntInput.parse}
+                                format={IntInput.format}
+                                type='number'
+                                validate={runtimeValidation} />
                         </Grid>
                         <Grid item xs={12} md={6}>
                             <Field
@@ -89,7 +91,15 @@ export const RunProcessAdvancedForm =
                                 parse={IntInput.parse}
                                 format={IntInput.format}
                                 type='number'
-                                validate={keepCacheRamValdation} />
+                                validate={keepCacheRamValidation} />
+                        </Grid>
+                        <Grid item xs={12} md={6}>
+                            <Field
+                                name={RUNNER_IMAGE_FIELD}
+                                component={TextField}
+                                label='Runner'
+                                required
+                                helperText='The container image with arvados-cwl-runner that will execute this workflow.' />
                         </Grid>
                     </Grid>
                 </ExpansionPanelDetails>
@@ -98,4 +108,5 @@ export const RunProcessAdvancedForm =
 
 const ramValidation = [min(0)];
 const vcpusValidation = [min(1)];
-const keepCacheRamValdation = [optional(min(0))];
+const keepCacheRamValidation = [optional(min(0))];
+const runtimeValidation = [optional(min(1))];
