[arvados-workbench2] created: 2.7.0-160-gc986217e
git repository hosting
git at public.arvados.org
Thu Oct 19 19:04:12 UTC 2023
at c986217e3930682b6b4ab49941314bdeb0357595 (commit)
commit c986217e3930682b6b4ab49941314bdeb0357595
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Oct 19 15:03:58 2023 -0400
19302: shared with me disabled 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 f6015fbf..ad0fac9f 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -81,7 +81,8 @@ export const initSidePanelTree = () =>
nodes
}));
SIDE_PANEL_CATEGORIES.forEach(category => {
- if (category !== SidePanelTreeCategory.PROJECTS && category !== SidePanelTreeCategory.SHARED_WITH_ME) {
+ // if (category !== SidePanelTreeCategory.PROJECTS && category !== SidePanelTreeCategory.SHARED_WITH_ME) {
+ if (category !== SidePanelTreeCategory.PROJECTS && category !== SidePanelTreeCategory.FAVORITES && category !== SidePanelTreeCategory.PUBLIC_FAVORITES ) {
dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
id: category,
pickerId: SIDE_PANEL_TREE,
@@ -95,9 +96,10 @@ export const loadSidePanelTreeProjects = (projectUuid: string) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
const treePicker = getTreePicker(SIDE_PANEL_TREE)(getState().treePicker);
const node = treePicker ? getNode(projectUuid)(treePicker) : undefined;
- if (projectUuid === SidePanelTreeCategory.SHARED_WITH_ME) {
- await dispatch<any>(loadSharedRoot);
- } else if (node || projectUuid !== '') {
+ // if (projectUuid === SidePanelTreeCategory.SHARED_WITH_ME) {
+ // await dispatch<any>(loadSharedRoot);
+ // } else
+ if (node || projectUuid !== '') {
await dispatch<any>(loadProject(projectUuid));
}
};
@@ -122,31 +124,31 @@ const loadProject = (projectUuid: string) =>
dispatch(resourcesActions.SET_RESOURCES(items));
};
-const loadSharedRoot = async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
- dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.SHARED_WITH_ME, 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 loadSharedRoot = async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+// dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.SHARED_WITH_ME, pickerId: SIDE_PANEL_TREE }));
- const { items } = await services.groupsService.shared(params);
+// 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
+// };
- dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
- id: SidePanelTreeCategory.SHARED_WITH_ME,
- pickerId: SIDE_PANEL_TREE,
- nodes: items.map(item => initTreeNode({ id: item.uuid, value: item })),
- }));
+// const { items } = await services.groupsService.shared(params);
- dispatch(resourcesActions.SET_RESOURCES(items));
-};
+// dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
+// id: SidePanelTreeCategory.SHARED_WITH_ME,
+// pickerId: SIDE_PANEL_TREE,
+// nodes: items.map(item => initTreeNode({ id: item.uuid, value: item })),
+// }));
+
+// dispatch(resourcesActions.SET_RESOURCES(items));
+// };
export const activateSidePanelTreeItem = (id: string) =>
async (dispatch: Dispatch, getState: () => RootState) => {
@@ -180,16 +182,16 @@ export const activateSidePanelTreeBranch = (id: string) =>
const userUuid = getUserUuid(getState());
if (!userUuid) { return; }
const ancestors = await services.ancestorsService.ancestors(id, userUuid);
- const isShared = ancestors.every(({ uuid }) => uuid !== userUuid);
- if (isShared) {
- await dispatch<any>(loadSidePanelTreeProjects(SidePanelTreeCategory.SHARED_WITH_ME));
- }
+ // const isShared = ancestors.every(({ uuid }) => uuid !== userUuid);
+ // if (isShared) {
+ // await dispatch<any>(loadSidePanelTreeProjects(SidePanelTreeCategory.SHARED_WITH_ME));
+ // }
for (const ancestor of ancestors) {
await dispatch<any>(loadSidePanelTreeProjects(ancestor.uuid));
}
dispatch(treePickerActions.EXPAND_TREE_PICKER_NODES({
ids: [
- ...(isShared ? [SidePanelTreeCategory.SHARED_WITH_ME] : []),
+ // ...(isShared ? [SidePanelTreeCategory.SHARED_WITH_ME] : []),
...ancestors.map(ancestor => ancestor.uuid)
],
pickerId: SIDE_PANEL_TREE
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list