21224: moved isNotFound fetching to data explorer Arvados-DCO-1.1-Signed-off-by:...
authorLisa Knox <lisaknox83@gmail.com>
Tue, 27 Feb 2024 15:09:21 +0000 (10:09 -0500)
committerLisa Knox <lisaknox83@gmail.com>
Tue, 27 Feb 2024 15:09:21 +0000 (10:09 -0500)
services/workbench2/src/views-components/data-explorer/data-explorer.tsx
services/workbench2/src/views/project-panel/project-panel.tsx
services/workbench2/src/views/search-results-panel/search-results-panel-view.tsx
services/workbench2/src/views/search-results-panel/search-results-panel.tsx

index b4536d83b9a8219c289c2e1f43d1df7fb5fb2978..e74897ce419b470eb085bcc126ffb060eed43168 100644 (file)
@@ -21,7 +21,6 @@ interface Props {
     onRowDoubleClick: (item: any) => void;
     extractKey?: (item: any) => React.Key;
     working?: boolean;
-    isNotFound?: boolean;
 }
 
 const mapStateToProps = ({ progressIndicator, dataExplorer, router, multiselect, detailsPanel, properties}: RootState, { id }: Props) => {
@@ -43,6 +42,7 @@ const mapStateToProps = ({ progressIndicator, dataExplorer, router, multiselect,
         isMSToolbarVisible,
         checkedList: multiselect.checkedList,
         working,
+        isNotFound: dataExplorerState.isNotFound,
     };
 };
 
index 148a477bf30696b5675359af9197b0b21b664c20..f6daeddf1341ab7661a2bda0564e6fcf6cf228d5 100644 (file)
@@ -256,7 +256,6 @@ interface ProjectPanelDataProps {
     userUuid: string;
     dataExplorerItems: any;
     working: boolean;
-    isNotFound: boolean;
 }
 
 type ProjectPanelProps = ProjectPanelDataProps & DispatchProp & WithStyles<CssRules> & RouteComponentProps<{ id: string }>;
@@ -264,11 +263,9 @@ type ProjectPanelProps = ProjectPanelDataProps & DispatchProp & WithStyles<CssRu
 const mapStateToProps = (state: RootState) => {
     const currentItemId = getProperty<string>(PROJECT_PANEL_CURRENT_UUID)(state.properties);
     const project = getResource<GroupResource>(currentItemId || "")(state.resources);
-    const isNotFound = state.dataExplorer[PROJECT_PANEL_ID] ? state.dataExplorer[PROJECT_PANEL_ID].isNotFound : false;
     return {
         currentItemId,
         project,
-        isNotFound,
         resources: state.resources,
         userUuid: state.auth.user!.uuid,
     };
@@ -289,7 +286,6 @@ export const ProjectPanel = withStyles(styles)(
                         contextMenuColumn={true}
                         defaultViewIcon={ProjectIcon}
                         defaultViewMessages={DEFAULT_VIEW_MESSAGES}
-                        isNotFound={this.props.isNotFound}
                     />
                 </div>
             }
index 34c28ed36148c7e74fb3210eb96f53cd15c387ef..e9693b50e5917ddfb8542ec26e42fc7cbb004c21 100644 (file)
@@ -168,7 +168,6 @@ export const SearchResultsPanelView = withStyles(styles, { withTheme: true })(
                 contextMenuColumn={false}
                 elementPath={`/ ${itemPath.reverse().join(' / ')}`}
                 hideSearchInput
-                isNotFound={props.isNotFound}
                 title={
                     <div>
                         {loggedIn.length === 1 ?
index 907189d1fa0906149da4ce86634318f94c3c7b41..87e26d50a2a7f7bed08f16d5a8400722723438e2 100644 (file)
@@ -23,7 +23,6 @@ export interface SearchResultsPanelDataProps {
     remoteHostsConfig: { [key: string]: Config };
     localCluster: string;
     numberOfItems: number;
-    isNotFound: boolean;
 }
 
 export interface SearchResultsPanelActionProps {
@@ -38,14 +37,12 @@ export type SearchResultsPanelProps = SearchResultsPanelDataProps & SearchResult
 const mapStateToProps = (rootState: RootState) => {
     const { dataExplorer } = rootState;
     const numberOfItems = dataExplorer[SEARCH_RESULTS_PANEL_ID].items.length;
-    const isNotFound = dataExplorer[SEARCH_RESULTS_PANEL_ID].isNotFound;
     return {
         user: rootState.auth.user,
         sessions: rootState.auth.sessions,
         remoteHostsConfig: rootState.auth.remoteHostsConfig,
         localCluster: rootState.auth.localCluster,
         numberOfItems,
-        isNotFound,
     };
 };