21386: project 404 vs empty working Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa...
[arvados.git] / services / workbench2 / src / store / data-explorer / data-explorer-reducer.ts
index a0a7eb6400b1160f0702d2e4243b94912c85bfa1..b50eabd69ac11d7da6b670bef0e614d95630a20d 100644 (file)
@@ -30,6 +30,7 @@ export interface DataExplorer {
     searchValue: string;
     working?: boolean;
     requestState: DataTableRequestState;
+    isResponse404: boolean;
 }
 
 export const initialDataExplorer: DataExplorer = {
@@ -42,6 +43,7 @@ export const initialDataExplorer: DataExplorer = {
     rowsPerPageOptions: [10, 20, 50, 100, 200, 500],
     searchValue: '',
     requestState: DataTableRequestState.IDLE,
+    isResponse404: false,
 };
 
 export type DataExplorerState = Record<string, DataExplorer>;
@@ -119,6 +121,9 @@ export const dataExplorerReducer = (
         TOGGLE_COLUMN: ({ id, columnName }) =>
             update(state, id, mapColumns(toggleColumn(columnName))),
 
+        SET_IS_RESPONSE_404: ({ id, isResponse404 }) =>
+            update(state, id, (explorer) => ({ ...explorer, isResponse404 })),
+
         default: () => state,
     });
 };