[ARVADOS-WORKBENCH2] updated: 1.2.0-528-g8a85c50
Git user
git at public.curoverse.com
Tue Oct 2 08:35:07 EDT 2018
Summary of changes:
src/components/data-explorer/data-explorer.tsx | 7 +++-
src/components/search-bar/search-bar.tsx | 43 ++++++++++++----------
.../collection-panel/collection-panel-action.ts | 3 +-
.../collection-panel/collection-panel-reducer.ts | 1 +
.../run-process-panel/run-process-panel-actions.ts | 4 +-
.../run-process-panel/run-process-panel-reducer.ts | 5 ++-
src/store/workbench/workbench-actions.ts | 5 +++
.../run-process-panel/run-process-first-step.tsx | 22 +++++++----
.../run-process-panel/run-process-panel-root.tsx | 5 ++-
src/views/run-process-panel/run-process-panel.tsx | 7 +++-
10 files changed, 66 insertions(+), 36 deletions(-)
via 8a85c509e4f2100082cfed6157d31c8651b861c9 (commit)
via 73511c8886bfe48d1084b7bd2a2c5bbee8ff6471 (commit)
via 68bcb877244747d3895212bd5b6d8fb228519ce9 (commit)
via 33f356b44d2935a5b3f3d233c3b635e8e7b50085 (commit)
via 7c6b67e16b7f00561d576aca20e4d428186ac397 (commit)
via c421cba83fb4d6ca6dd11ada099c7b8c1da55d27 (commit)
via 7bc4d3ab2214ba252a8fdcfb64008ecc1cf50cfe (commit)
via 131e30396e465c422f442becd2aa33cb15512238 (commit)
via 7299f093d4325802cbabf89c0b4861768b19b472 (commit)
from 852b19504c30cbc71cdf2fc55cee3a29d42bd4be (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 8a85c509e4f2100082cfed6157d31c8651b861c9
Merge: 852b195 73511c8
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Tue Oct 2 14:34:51 2018 +0200
Merge branch 'master'
Feature #13863
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --cc src/store/run-process-panel/run-process-panel-actions.ts
index a58eff8,3a3f6b0..7112f71
--- a/src/store/run-process-panel/run-process-panel-actions.ts
+++ b/src/store/run-process-panel/run-process-panel-actions.ts
@@@ -49,45 -41,4 +50,46 @@@ export const setWorkflow = (workflow: W
export const goToStep = (step: number) => runProcessPanelActions.SET_CURRENT_STEP(step);
-export const searchWorkflows = (term: string) => runProcessPanelActions.SEARCH_WORKFLOWS(term);
+export const runProcess = async (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
+ const state = getState();
+ const basicForm = getFormValues(RUN_PROCESS_BASIC_FORM)(state) as RunProcessBasicFormData;
+ const inputsForm = getFormValues(RUN_PROCESS_INPUTS_FORM)(state) as WorkflowInputsData;
+ const advancedForm = getFormValues(RUN_PROCESS_ADVANCED_FORM)(state) as RunProcessAdvancedFormData;
+ const { processOwnerUuid, selectedWorkflow } = state.runProcessPanel;
+ if (selectedWorkflow) {
+ const newProcessData = {
+ ownerUuid: processOwnerUuid,
+ name: basicForm.name,
+ description: basicForm.description,
+ state: ContainerRequestState.COMMITTED,
+ mounts: createWorkflowMounts(selectedWorkflow, normalizeInputKeys(inputsForm)),
+ runtimeConstraints: {
+ API: true,
+ vcpus: 1,
+ ram: 1073741824,
+ },
+ containerImage: 'arvados/jobs:1.1.4.20180618144723',
+ cwd: '/var/spool/cwl',
+ command: [
+ 'arvados-cwl-runner',
+ '--local',
+ '--api=containers',
+ `--project-uuid=${processOwnerUuid}`,
+ '/var/lib/cwl/workflow.json#main',
+ '/var/lib/cwl/cwl.input.json'
+ ],
+ outputPath: '/var/spool/cwl',
+ priority: 1,
+ outputName: advancedForm && advancedForm.output ? advancedForm.output : undefined,
+ };
+ const newProcess = await services.containerRequestService.create(newProcessData);
+ dispatch(navigateToProcess(newProcess.uuid));
+ }
+};
+
+const normalizeInputKeys = (inputs: WorkflowInputsData): WorkflowInputsData =>
+ Object.keys(inputs).reduce((normalizedInputs, key) => ({
+ ...normalizedInputs,
+ [key.split('/').slice(1).join('/')]: inputs[key],
- }), {});
++ }), {});
++export const searchWorkflows = (term: string) => runProcessPanelActions.SEARCH_WORKFLOWS(term);
diff --cc src/store/run-process-panel/run-process-panel-reducer.ts
index 2470de1,10cdaeb..0ad06be
--- a/src/store/run-process-panel/run-process-panel-reducer.ts
+++ b/src/store/run-process-panel/run-process-panel-reducer.ts
@@@ -3,33 -3,27 +3,36 @@@
// SPDX-License-Identifier: AGPL-3.0
import { RunProcessPanelAction, runProcessPanelActions } from '~/store/run-process-panel/run-process-panel-actions';
-import { WorkflowResource } from '~/models/workflow';
+import { WorkflowResource, CommandInputParameter, getWorkflowInputs, parseWorkflowDefinition } from '~/models/workflow';
interface RunProcessPanel {
+ processOwnerUuid: string;
currentStep: number;
workflows: WorkflowResource[];
+ searchWorkflows: WorkflowResource[];
selectedWorkflow: WorkflowResource | undefined;
+ inputs: CommandInputParameter[];
}
const initialState: RunProcessPanel = {
+ processOwnerUuid: '',
currentStep: 0,
workflows: [],
+ selectedWorkflow: undefined,
+ inputs: [],
+ searchWorkflows: [],
- selectedWorkflow: undefined
};
export const runProcessPanelReducer = (state = initialState, action: RunProcessPanelAction): RunProcessPanel =>
runProcessPanelActions.match(action, {
+ SET_PROCESS_OWNER_UUID: processOwnerUuid => ({ ...state, processOwnerUuid }),
SET_CURRENT_STEP: currentStep => ({ ...state, currentStep }),
- SET_WORKFLOWS: workflows => ({ ...state, workflows }),
+ SET_SELECTED_WORKFLOW: selectedWorkflow => ({
+ ...state,
+ selectedWorkflow,
+ inputs: getWorkflowInputs(parseWorkflowDefinition(selectedWorkflow)) || [],
+ }),
+ SET_WORKFLOWS: workflows => ({ ...state, workflows, searchWorkflows: workflows }),
- SET_SELECTED_WORKFLOW: selectedWorkflow => ({ ...state, selectedWorkflow }),
+ SEARCH_WORKFLOWS: term => ({ ...state, searchWorkflows: state.workflows.filter(workflow => workflow.name.includes(term)) }),
default: () => state
});
diff --cc src/views/run-process-panel/run-process-panel-root.tsx
index da21d70,b656ba1..1489527
--- a/src/views/run-process-panel/run-process-panel-root.tsx
+++ b/src/views/run-process-panel/run-process-panel-root.tsx
@@@ -17,15 -15,16 +17,16 @@@ export type RunProcessPanelRootActionPr
type RunProcessPanelRootProps = RunProcessPanelRootDataProps & RunProcessPanelRootActionProps;
- export const RunProcessPanelRoot = ({ runProcess, currentStep, onSetStep, onSetWorkflow, workflows, selectedWorkflow }: RunProcessPanelRootProps) =>
-export const RunProcessPanelRoot = ({ currentStep, onSearch, onSetStep, onRunProcess, onSetWorkflow, workflows, selectedWorkflow }: RunProcessPanelRootProps) =>
++export const RunProcessPanelRoot = ({ runProcess, currentStep, onSearch, onSetStep, onSetWorkflow, workflows, selectedWorkflow }: RunProcessPanelRootProps) =>
<Stepper activeStep={currentStep} orientation="vertical" elevation={2}>
<Step>
<StepLabel>Choose a workflow</StepLabel>
<StepContent>
- <RunProcessFirstStep
+ <RunProcessFirstStep
workflows={workflows}
selectedWorkflow={selectedWorkflow}
- onSetStep={onSetStep}
+ onSearch={onSearch}
+ onSetStep={onSetStep}
onSetWorkflow={onSetWorkflow} />
</StepContent>
</Step>
diff --cc src/views/run-process-panel/run-process-panel.tsx
index 68917c2,1f43e05..42324ab
--- a/src/views/run-process-panel/run-process-panel.tsx
+++ b/src/views/run-process-panel/run-process-panel.tsx
@@@ -6,7 -6,7 +6,7 @@@ import { Dispatch } from 'redux'
import { connect } from 'react-redux';
import { RootState } from '~/store/store';
import { RunProcessPanelRootDataProps, RunProcessPanelRootActionProps, RunProcessPanelRoot } from '~/views/run-process-panel/run-process-panel-root';
- import { goToStep, setWorkflow, runProcess } from '~/store/run-process-panel/run-process-panel-actions';
-import { goToStep, setWorkflow, searchWorkflows } from '~/store/run-process-panel/run-process-panel-actions';
++import { goToStep, setWorkflow, runProcess, searchWorkflows } from '~/store/run-process-panel/run-process-panel-actions';
import { WorkflowResource } from '~/models/workflow';
const mapStateToProps = ({ runProcessPanel }: RootState): RunProcessPanelRootDataProps => {
@@@ -24,8 -24,11 +24,11 @@@ const mapDispatchToProps = (dispatch: D
onSetWorkflow: (workflow: WorkflowResource) => {
dispatch<any>(setWorkflow(workflow));
},
- onRunProcess: () => {
-
+ runProcess: () => {
+ dispatch<any>(runProcess);
+ },
+ onSearch: (term: string) => {
+ dispatch<any>(searchWorkflows(term));
}
});
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list