21386: search results good Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox@curii...
[arvados.git] / services / workbench2 / src / views / search-results-panel / search-results-panel.tsx
index 639008216c33fff822e5d450d73f3d402cc61a03..df243d67cfd95df9f6e43d629844bccd94d0672d 100644 (file)
@@ -14,7 +14,6 @@ import { User } from "models/user";
 import { Config } from 'common/config';
 import { Session } from "models/session";
 import { toggleOne, deselectAllOthers } from "store/multiselect/multiselect-actions";
-import { progressIndicatorActions } from 'store/progress-indicator/progress-indicator-actions';
 import { SEARCH_RESULTS_PANEL_ID } from 'store/search-results-panel/search-results-panel-actions';
 
 export interface SearchResultsPanelDataProps {
@@ -24,6 +23,7 @@ export interface SearchResultsPanelDataProps {
     remoteHostsConfig: { [key: string]: Config };
     localCluster: string;
     numberOfItems: number;
+    is404: boolean;
 }
 
 export interface SearchResultsPanelActionProps {
@@ -31,8 +31,6 @@ export interface SearchResultsPanelActionProps {
     onContextMenu: (event: React.MouseEvent<HTMLElement>, item: string) => void;
     onDialogOpen: (ownerUuid: string) => void;
     onItemDoubleClick: (item: string) => void;
-    startSpinner: () => void;
-    stopSpinner: () => void;
 }
 
 export type SearchResultsPanelProps = SearchResultsPanelDataProps & SearchResultsPanelActionProps;
@@ -40,12 +38,14 @@ export type SearchResultsPanelProps = SearchResultsPanelDataProps & SearchResult
 const mapStateToProps = (rootState: RootState) => {
     const { dataExplorer } = rootState;
     const numberOfItems = dataExplorer[SEARCH_RESULTS_PANEL_ID].items.length;
+    const is404 = dataExplorer[SEARCH_RESULTS_PANEL_ID].isResponse404;
     return {
         user: rootState.auth.user,
         sessions: rootState.auth.sessions,
         remoteHostsConfig: rootState.auth.remoteHostsConfig,
         localCluster: rootState.auth.localCluster,
         numberOfItems,
+        is404,
     };
 };
 
@@ -61,13 +61,7 @@ const mapDispatchToProps = (dispatch: Dispatch): SearchResultsPanelActionProps =
     },
     onItemDoubleClick: uuid => {
         dispatch<any>(navigateTo(uuid));
-    },
-    startSpinner: () => {
-        dispatch<any>(progressIndicatorActions.START_WORKING(SEARCH_RESULTS_PANEL_ID));
-    },
-    stopSpinner: () => {
-        dispatch<any>(progressIndicatorActions.STOP_WORKING(SEARCH_RESULTS_PANEL_ID));
-    },
+    }
 });
 
 export const SearchResultsPanel = connect(mapStateToProps, mapDispatchToProps)(SearchResultsPanelView);