[arvados] updated: 2.7.0-6272-gdcb2c2cb59

git repository hosting git at public.arvados.org
Tue May 7 15:05:13 UTC 2024


Summary of changes:
 .../search-results-middleware-service.ts               | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

       via  dcb2c2cb598c3d9524b97e7a2a45e4bdf9d5f75b (commit)
      from  f3abd1235b56b32d93c992dc376b895559af39ca (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit dcb2c2cb598c3d9524b97e7a2a45e4bdf9d5f75b
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Tue May 7 11:05:09 2024 -0400

    21364: removed responseMap and lastQuery Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/services/workbench2/src/store/search-results-panel/search-results-middleware-service.ts b/services/workbench2/src/store/search-results-panel/search-results-middleware-service.ts
index 866e148bcd..11462c0618 100644
--- a/services/workbench2/src/store/search-results-panel/search-results-middleware-service.ts
+++ b/services/workbench2/src/store/search-results-panel/search-results-middleware-service.ts
@@ -30,7 +30,7 @@ import { progressIndicatorActions } from 'store/progress-indicator/progress-indi
 import { dataExplorerActions } from 'store/data-explorer/data-explorer-action';
 
 export class SearchResultsMiddlewareService extends DataExplorerMiddlewareService {
-    constructor(private services: ServiceRepository, id: string, private responseMap: Record<string, number> = {}) {
+    constructor(private services: ServiceRepository, id: string) {
         super(id);
     }
 
@@ -40,11 +40,6 @@ export class SearchResultsMiddlewareService extends DataExplorerMiddlewareServic
         const searchValue = state.searchBar.searchValue;
         const { cluster: clusterId } = getAdvancedDataFromQuery(searchValue);
         const sessions = getSearchSessions(clusterId, state.auth.sessions);
-        const recentQueries = this.services.searchService.getRecentQueries();
-        //the last query is compared to the current query to check if the value has changed
-        //once the search button is clicked, the value is pushed to the recentQueries array
-        //therefore, the last query is the second to last element in the array 
-        const lastQuery = recentQueries[recentQueries.length - 2];
 
         if (searchValue.trim() === '') {
             return;
@@ -76,11 +71,6 @@ export class SearchResultsMiddlewareService extends DataExplorerMiddlewareServic
             const params = getParams(dataExplorer, searchValue, session.apiRevision);
             this.services.groupsService.contents('', params, session)
                 .then((response) => {
-                    //if items were added or deleted, we ignore them for "load more" button purposes
-                    if (lastQuery === searchValue && this.responseMap[session.clusterId] && this.responseMap[session.clusterId] !== response.itemsAvailable) {
-                        response.itemsAvailable = this.responseMap[session.clusterId];
-                    }
-                    this.responseMap[session.clusterId] = response.itemsAvailable;
                     api.dispatch(updateResources(response.items));
                     api.dispatch(appendItems(response));
                     numberOfResolvedResponses++;
@@ -149,9 +139,13 @@ export const setItems = (listResults: ListResults<GroupContentsResource>) =>
         items: listResults.items.map(resource => resource.uuid),
     });
 
-export const resetItemsAvailable = () =>
+const resetItemsAvailable = () =>
     searchResultsPanelActions.RESET_ITEMS_AVAILABLE();
 
+const setItemsAvailable = (id: string, itemsAvailable: number) => {
+
+}
+
 export const appendItems = (listResults: ListResults<GroupContentsResource>) =>
     searchResultsPanelActions.APPEND_ITEMS({
         ...listResultsToDataExplorerItemsMeta(listResults),

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list