[arvados] updated: 2.7.0-6085-g9ce086be94

git repository hosting git at public.arvados.org
Fri Mar 8 19:37:06 UTC 2024


Summary of changes:
 services/workbench2/src/components/tree/tree.tsx               |  2 +-
 .../src/store/side-panel-tree/side-panel-tree-actions.ts       | 10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

       via  9ce086be94935233601712eb5a07e252266f4e8d (commit)
      from  f8f5995fb9e1d036ff1b5d5d479bfae6698e9935 (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 9ce086be94935233601712eb5a07e252266f4e8d
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Fri Mar 8 14:37:02 2024 -0500

    21357: fixed public fave filtering for admin  Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/services/workbench2/src/components/tree/tree.tsx b/services/workbench2/src/components/tree/tree.tsx
index 11a9540290..1f7aa8326d 100644
--- a/services/workbench2/src/components/tree/tree.tsx
+++ b/services/workbench2/src/components/tree/tree.tsx
@@ -252,7 +252,7 @@ const FlatTree = (props: FlatTreeProps) =>
     >
         {
             (props.it.items || [])
-                .map((item: any) => <div key={item.id} data-id={item.id}
+                .map((item: any, index: number) => <div key={item.id || index} data-id={item.id}
                     className={classnames(props.classes.childItem, { [props.classes.active]: item.active })}
                     style={{ paddingLeft: `${item.depth * props.levelIndentation}px` }}>
                     {isInFavoritesTree(props.it) ? 
diff --git a/services/workbench2/src/store/side-panel-tree/side-panel-tree-actions.ts b/services/workbench2/src/store/side-panel-tree/side-panel-tree-actions.ts
index 8b8b7cc7d1..a136e2c1e4 100644
--- a/services/workbench2/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/services/workbench2/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -201,9 +201,11 @@ export const loadPublicFavoritesTree = () => async (dispatch: Dispatch, getState
             .getFilters()
     });
 
-    const filtereditems = groupItems.items.concat(collectionItems.items).concat(processItems.items);
+    const responseItems = groupItems.items.concat(collectionItems.items).concat(processItems.items);
 
-    for(const item of filtereditems) {
+    const filteredItems = items.filter(item => responseItems.some(responseItem => responseItem.uuid === item.headUuid));
+
+    for(const item of filteredItems) {
         const verifiedName = await verifyAndUpdateLinkName(item, dispatch, getState, services);
         item.name = verifiedName;
     }
@@ -212,11 +214,11 @@ export const loadPublicFavoritesTree = () => async (dispatch: Dispatch, getState
         treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
             id: SidePanelTreeCategory.PUBLIC_FAVORITES,
             pickerId: SIDE_PANEL_TREE,
-            nodes: filtereditems.map(item => initTreeNode({ id: item.headUuid, value: item })),
+            nodes: filteredItems.map(item => initTreeNode({ id: item.headUuid, value: item })),
         })
     );
 
-    dispatch(resourcesActions.SET_RESOURCES(filtereditems));
+    dispatch(resourcesActions.SET_RESOURCES(responseItems));
 };
 
 export const activateSidePanelTreeItem = (id: string) =>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list