Merge branch '19715-preserve-url-autologout' into main. Closes #19715
[arvados.git] / src / store / process-panel / process-panel-reducer.ts
index 48cdb39f8402ce1f1e63ca57d5fea3a1c3517a3b..8e190ead37aefa838b55c6cd960fb7f48af34ccb 100644 (file)
@@ -11,6 +11,7 @@ const initialState: ProcessPanel = {
     inputRaw: null,
     inputParams: null,
     outputRaw: null,
+    nodeInfo: null,
     outputDefinitions: [],
     outputParams: null,
 };
@@ -32,7 +33,7 @@ export const processPanelReducer = (state = initialState, action: ProcessPanelAc
         SET_INPUT_RAW: inputRaw => {
             // Since mounts can disappear and reappear, only set inputs
             //   if current state is null or new inputs has content
-            if (state.inputRaw === null || (inputRaw && inputRaw.length)) {
+            if (state.inputRaw === null || (inputRaw && Object.keys(inputRaw).length)) {
                 return { ...state, inputRaw };
             } else {
                 return state;
@@ -50,6 +51,9 @@ export const processPanelReducer = (state = initialState, action: ProcessPanelAc
         SET_OUTPUT_RAW: outputRaw => {
             return { ...state, outputRaw };
         },
+        SET_NODE_INFO: ({ nodeInfo }) => {
+            return { ...state, nodeInfo };
+        },
         SET_OUTPUT_DEFINITIONS: outputDefinitions => {
             // Set output definitions is only additive to avoid clearing when mounts go temporarily missing
             if (outputDefinitions.length) {