[arvados-workbench2] updated: 2.7.0-162-g70cc7de1
git repository hosting
git at public.arvados.org
Tue Oct 24 15:08:34 UTC 2023
Summary of changes:
.../side-panel-tree/side-panel-tree-actions.ts | 53 ++++++++++++----------
1 file changed, 30 insertions(+), 23 deletions(-)
via 70cc7de1fd7fb72c757a8466dee7ca6bf8e55c84 (commit)
from 8a4ef30d51b2ccc6138bc1d8d8300b106bcdd8b2 (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 70cc7de1fd7fb72c757a8466dee7ca6bf8e55c84
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Tue Oct 24 11:08:25 2023 -0400
19302: publicfavorites works Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 05fe84f2..5ed7eee1 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -20,6 +20,8 @@ import { CategoriesListReducer } from 'common/plugintypes';
import { pluginConfig } from 'plugins';
import { LinkClass } from 'models/link';
+
+
export enum SidePanelTreeCategory {
PROJECTS = 'Home Projects',
SHARED_WITH_ME = 'Shared with me',
@@ -152,29 +154,34 @@ const loadFavorites = async (dispatch: Dispatch, getState: () => RootState, serv
};
const loadPublicFavorites = async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
- // dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.PUBLIC_FAVORITES, pickerId: SIDE_PANEL_TREE }));
-
- // const params = {
- // filters: `[${new FilterBuilder()
- // .addIsA('uuid', ResourceKind.PROJECT)
- // .addIn('group_class', [GroupClass.PROJECT, GroupClass.FILTER])
- // .addDistinct('uuid', getState().auth.config.uuidPrefix + '-j7d0g-publicfavorites')
- // .getFilters()}]`,
- // order: new OrderBuilder<ProjectResource>()
- // .addAsc('name', GroupContentsResourcePrefix.PROJECT)
- // .getOrder(),
- // limit: 1000
- // };
-
- // const { items } = await services.groupsService.shared(params);
-
- // dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
- // id: SidePanelTreeCategory.PUBLIC_FAVORITES,
- // pickerId: SIDE_PANEL_TREE,
- // nodes: items.map(item => initTreeNode({ id: item.uuid, value: item })),
- // }));
-
- // dispatch(resourcesActions.SET_RESOURCES(items));
+ dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.PUBLIC_FAVORITES, pickerId: SIDE_PANEL_TREE }));
+
+ const uuidPrefix = getState().auth.config.uuidPrefix;
+ const publicProjectUuid = `${uuidPrefix}-j7d0g-publicfavorites`;
+ const typeFilters = [ResourceKind.COLLECTION, ResourceKind.CONTAINER_REQUEST, ResourceKind.GROUP, ResourceKind.WORKFLOW];
+
+ const params = {
+ filters: new FilterBuilder()
+ .addEqual('link_class', LinkClass.STAR)
+ .addEqual('owner_uuid', publicProjectUuid)
+ .addIsA('head_uuid', typeFilters)
+ .getFilters(),
+ // order: new OrderBuilder<ProjectResource>()
+ // .addAsc('name', GroupContentsResourcePrefix.PROJECT)
+ // .getOrder(),
+ // limit: 1000
+ };
+
+ const { items } = await services.linkService.list(params);
+ console.log(items)
+
+ dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
+ id: SidePanelTreeCategory.PUBLIC_FAVORITES,
+ pickerId: SIDE_PANEL_TREE,
+ nodes: items.map(item => initTreeNode({ id: item.headUuid, value: item })),
+ }));
+
+ dispatch(resourcesActions.SET_RESOURCES(items));
};
export const activateSidePanelTreeItem = (id: string) =>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list