[ARVADOS-WORKBENCH2] updated: 2.2.1-78-g264e8d55

Git user git at public.arvados.org
Fri Sep 10 20:39:24 UTC 2021


Summary of changes:
 src/store/all-processes-panel/all-processes-panel-middleware-service.ts | 2 +-
 .../collections-content-address-middleware-service.ts                   | 2 +-
 src/store/data-explorer/data-explorer-reducer.ts                        | 2 +-
 src/store/favorite-panel/favorite-panel-middleware-service.ts           | 2 +-
 src/store/public-favorites-panel/public-favorites-middleware-service.ts | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

       via  264e8d55b4f30244cf3084c33c8f27141caa9082 (commit)
      from  e983d1cc16a370a1cf0ab3dccc47049a34ef049d (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 264e8d55b4f30244cf3084c33c8f27141caa9082
Author: Stephen Smith <stephen at curii.com>
Date:   Fri Sep 10 16:37:58 2021 -0400

    18029: Handle empty data explorer in data explorer reducer
    
    Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>

diff --git a/src/store/all-processes-panel/all-processes-panel-middleware-service.ts b/src/store/all-processes-panel/all-processes-panel-middleware-service.ts
index 05c8882d..88b64e62 100644
--- a/src/store/all-processes-panel/all-processes-panel-middleware-service.ts
+++ b/src/store/all-processes-panel/all-processes-panel-middleware-service.ts
@@ -45,7 +45,7 @@ export class AllProcessesPanelMiddlewareService extends DataExplorerMiddlewareSe
                 api.dispatch(allProcessesPanelActions.SET_ITEMS({
                     items: processItems.items.map((resource: any) => resource.uuid),
                     itemsAvailable: processItems.itemsAvailable,
-                    page: Math.floor(processItems.offset / processItems.limit) || 0,
+                    page: Math.floor(processItems.offset / processItems.limit),
                     rowsPerPage: processItems.limit
                 }));
             } catch {
diff --git a/src/store/collections-content-address-panel/collections-content-address-middleware-service.ts b/src/store/collections-content-address-panel/collections-content-address-middleware-service.ts
index 42bb476b..983b309a 100644
--- a/src/store/collections-content-address-panel/collections-content-address-middleware-service.ts
+++ b/src/store/collections-content-address-panel/collections-content-address-middleware-service.ts
@@ -112,7 +112,7 @@ export class CollectionsWithSameContentAddressMiddlewareService extends DataExpl
                     api.dispatch(collectionsContentAddressActions.SET_ITEMS({
                         items: response.items.map((resource: any) => resource.uuid),
                         itemsAvailable: response.itemsAvailable,
-                        page: Math.floor(response.offset / response.limit) || 0,
+                        page: Math.floor(response.offset / response.limit),
                         rowsPerPage: response.limit
                     }));
                 }
diff --git a/src/store/data-explorer/data-explorer-reducer.ts b/src/store/data-explorer/data-explorer-reducer.ts
index c6aa7116..f67cccdc 100644
--- a/src/store/data-explorer/data-explorer-reducer.ts
+++ b/src/store/data-explorer/data-explorer-reducer.ts
@@ -57,7 +57,7 @@ export const dataExplorerReducer = (state: DataExplorerState = {}, action: DataE
             update(state, id, mapColumns(setFilters(columnName, filters))),
 
         SET_ITEMS: ({ id, items, itemsAvailable, page, rowsPerPage }) =>
-            update(state, id, explorer => ({ ...explorer, items, itemsAvailable, page, rowsPerPage })),
+            update(state, id, explorer => ({ ...explorer, items, itemsAvailable, page: page || 0, rowsPerPage })),
 
         APPEND_ITEMS: ({ id, items, itemsAvailable, page, rowsPerPage }) =>
             update(state, id, explorer => ({
diff --git a/src/store/favorite-panel/favorite-panel-middleware-service.ts b/src/store/favorite-panel/favorite-panel-middleware-service.ts
index 7177e5a7..f88f7b91 100644
--- a/src/store/favorite-panel/favorite-panel-middleware-service.ts
+++ b/src/store/favorite-panel/favorite-panel-middleware-service.ts
@@ -103,7 +103,7 @@ export class FavoritePanelMiddlewareService extends DataExplorerMiddlewareServic
                 api.dispatch(favoritePanelActions.SET_ITEMS({
                     items: response.items.map((resource: any) => resource.uuid),
                     itemsAvailable: response.itemsAvailable,
-                    page: Math.floor(response.offset / response.limit) || 0,
+                    page: Math.floor(response.offset / response.limit),
                     rowsPerPage: response.limit
                 }));
                 api.dispatch<any>(updateFavorites(response.items.map((item: any) => item.uuid)));
diff --git a/src/store/public-favorites-panel/public-favorites-middleware-service.ts b/src/store/public-favorites-panel/public-favorites-middleware-service.ts
index 8a8876c1..dd21a380 100644
--- a/src/store/public-favorites-panel/public-favorites-middleware-service.ts
+++ b/src/store/public-favorites-panel/public-favorites-middleware-service.ts
@@ -100,7 +100,7 @@ export class PublicFavoritesMiddlewareService extends DataExplorerMiddlewareServ
                 api.dispatch(publicFavoritePanelActions.SET_ITEMS({
                     items: response.items.map((resource: any) => resource.uuid),
                     itemsAvailable: response.itemsAvailable,
-                    page: Math.floor(response.offset / response.limit) || 0,
+                    page: Math.floor(response.offset / response.limit),
                     rowsPerPage: response.limit
                 }));
                 api.dispatch<any>(updatePublicFavorites(response.items.map((item: any) => item.uuid)));

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list