} from '~/views/run-process-panel/run-process-advanced-form';
import { dialogActions } from '~/store/dialog/dialog-actions';
import { setBreadcrumbs } from '~/store/breadcrumbs/breadcrumbs-actions';
-import { matchProjectRoute } from '~/routes/routes';
export const runProcessPanelActions = unionize({
SET_PROCESS_PATHNAME: ofType<string>(),
if (hints) {
const resc = hints.find(item => item.class === 'http://arvados.org/cwl#WorkflowRunnerResources') as WorkflowRunnerResources | undefined;
if (resc) {
- if (resc.ramMin) { advancedFormValues[RAM_FIELD] = resc.ramMin; }
+ if (resc.ramMin) { advancedFormValues[RAM_FIELD] = resc.ramMin * (1024 * 1024); }
if (resc.coresMin) { advancedFormValues[VCPUS_FIELD] = resc.coresMin; }
- if (resc.keep_cache) { advancedFormValues[KEEP_CACHE_RAM_FIELD] = resc.keep_cache; }
+ if (resc.keep_cache) { advancedFormValues[KEEP_CACHE_RAM_FIELD] = resc.keep_cache * (1024 * 1024); }
if (resc.acrContainerImage) { advancedFormValues[RUNNER_IMAGE_FIELD] = resc.acrContainerImage; }
}
}
const inputsForm = getFormValues(RUN_PROCESS_INPUTS_FORM)(state) as WorkflowInputsData;
const userUuid = getUserUuid(getState());
if (!userUuid) { return; }
- const pathname = getState().runProcessPanel.processPathname;
const { processOwnerUuid, selectedWorkflow } = state.runProcessPanel;
- const ownerUUid = !matchProjectRoute(pathname) ? userUuid : processOwnerUuid;
+ const ownerUUid = processOwnerUuid ? processOwnerUuid : userUuid;
if (selectedWorkflow) {
const advancedForm = getFormValues(RUN_PROCESS_ADVANCED_FORM)(state) as RunProcessAdvancedFormData || getWorkflowRunnerSettings(selectedWorkflow);
const newProcessData = {
runtimeConstraints: {
API: true,
vcpus: advancedForm[VCPUS_FIELD],
- ram: advancedForm[RAM_FIELD],
+ ram: (advancedForm[KEEP_CACHE_RAM_FIELD] + advancedForm[RAM_FIELD]),
},
schedulingParameters: {
max_run_time: advancedForm[RUNTIME_FIELD]
}
};
-export const DEFAULT_ADVANCED_FORM_VALUES: Partial<RunProcessAdvancedFormData> = {
+const DEFAULT_ADVANCED_FORM_VALUES: Partial<RunProcessAdvancedFormData> = {
[VCPUS_FIELD]: 1,
[RAM_FIELD]: 1073741824,
+ [KEEP_CACHE_RAM_FIELD]: 268435456,
[RUNNER_IMAGE_FIELD]: "arvados/jobs"
};