refs #14370-display-correct-description
authorPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Tue, 15 Jan 2019 16:03:15 +0000 (17:03 +0100)
committerPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Tue, 15 Jan 2019 16:03:15 +0000 (17:03 +0100)
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>

src/store/process-panel/process-panel-actions.ts
src/store/workflow-panel/workflow-panel-actions.ts

index f1f74f6d63b60208dfdd60891eda92d48055a9ed..42a718bd69a9b4a4fde1f9217c36812d08a44829 100644 (file)
@@ -26,7 +26,6 @@ export const loadProcessPanel = (uuid: string) =>
     (dispatch: Dispatch) => {
         dispatch<any>(loadProcess(uuid));
         dispatch(initProcessPanelFilters);
-        dispatch<any>(showWorkflowDetails(uuid));
     };
 
 export const navigateToOutput = (uuid: string) =>
@@ -42,6 +41,7 @@ export const navigateToOutput = (uuid: string) =>
 export const openWorkflow = (uuid: string) =>
     (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         dispatch<any>(navigateToWorkflows);
+        dispatch<any>(showWorkflowDetails(uuid));
     };
 
 export const initProcessPanelFilters = procesPanelActions.SET_PROCESS_PANEL_FILTERS([
index 2f00bba66fa4cf5866630b1ea88bd260c526126b..03ddf34150a2394ca3023d81b7bf1e5a4bca0efb 100644 (file)
@@ -61,5 +61,7 @@ export const showWorkflowDetails = (uuid: string) =>
 
 export const getWorkflowDetails = (state: RootState) => {
     const uuid = getProperty<string>(WORKFLOW_PANEL_DETAILS_UUID)(state.properties);
-    return uuid ? getResource<WorkflowResource>(uuid)(state.resources) : undefined;
+    const workflows = state.runProcessPanel.workflows;
+    const workflow = workflows.find(workflow => workflow.uuid === uuid);
+    return workflow || undefined;
 };