X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b02573dbdd8dae7c2f9bdafa2f6ac847168b024a..5e7459e2089b92e25611d1835bf3a620ba655c60:/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 37e1546990..30ff494c1e 100644
--- a/src/views/run-process-panel/run-process-advanced-form.tsx
+++ b/src/views/run-process-panel/run-process-advanced-form.tsx
@@ -12,6 +12,7 @@ import * as IntInput from './inputs/int-input';
 import { require } from '~/validators/require';
 import { min } from '~/validators/min';
 import { optional } from '~/validators/optional';
+import { SwitchField } from '~/components/switch-field/switch-field';
 
 export const RUN_PROCESS_ADVANCED_FORM = 'runProcessAdvancedForm';
 
@@ -20,6 +21,7 @@ export const RUNTIME_FIELD = 'runtime';
 export const RAM_FIELD = 'ram';
 export const VCPUS_FIELD = 'vcpus';
 export const KEEP_CACHE_RAM_FIELD = 'keepCacheRam';
+export const API_FIELD = 'api';
 
 export interface RunProcessAdvancedFormData {
     [OUTPUT_FIELD]?: string;
@@ -27,6 +29,7 @@ export interface RunProcessAdvancedFormData {
     [RAM_FIELD]: number;
     [VCPUS_FIELD]: number;
     [KEEP_CACHE_RAM_FIELD]?: number;
+    [API_FIELD]?: boolean;
 }
 
 export const RunProcessAdvancedForm =
@@ -92,6 +95,16 @@ export const RunProcessAdvancedForm =
                                 type='number'
                                 validate={keepCacheRamValdation} />
                         </Grid>
+                        <Grid item xs={12} md={6}>
+                            <Field
+                                name={API_FIELD}
+                                component={SwitchField}
+                                switchProps={{
+                                    color: 'primary'
+                                }}
+                                label='API'
+                                helperText='When set, ARVADOS_API_HOST and ARVADOS_API_TOKEN will be set, and process will have networking enabled to access the Arvados API server.' />
+                        </Grid>
                     </Grid>
                 </ExpansionPanelDetails>
             </ExpansionPanel>
