[ARVADOS-WORKBENCH2] updated: 1.2.0-382-ga189d04
Git user
git at public.curoverse.com
Mon Sep 17 05:33:05 EDT 2018
Summary of changes:
src/store/breadcrumbs/breadcrumbs-actions.ts | 15 ++++++++++++---
src/store/workbench/workbench-actions.ts | 8 +-------
2 files changed, 13 insertions(+), 10 deletions(-)
via a189d04efc7e3d8f7a66f7302ac1fda346c40a4e (commit)
from 9dd75d38ab049da5c98f81fa69b5247356bba438 (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 a189d04efc7e3d8f7a66f7302ac1fda346c40a4e
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Mon Sep 17 11:32:31 2018 +0200
Update breadcrumbs to handle collections and processes
Feature #13751
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/store/breadcrumbs/breadcrumbs-actions.ts b/src/store/breadcrumbs/breadcrumbs-actions.ts
index dd35da3..94f45aa 100644
--- a/src/store/breadcrumbs/breadcrumbs-actions.ts
+++ b/src/store/breadcrumbs/breadcrumbs-actions.ts
@@ -7,11 +7,11 @@ import { RootState } from '~/store/store';
import { Breadcrumb } from '~/components/breadcrumbs/breadcrumbs';
import { getResource } from '~/store/resources/resources';
import { TreePicker } from '../tree-picker/tree-picker';
-import { getSidePanelTreeBranch } from '../side-panel-tree/side-panel-tree-actions';
+import { getSidePanelTreeBranch, getSidePanelTreeNodeAncestorsIds } from '../side-panel-tree/side-panel-tree-actions';
import { propertiesActions } from '../properties/properties-actions';
import { getProcess } from '~/store/processes/process';
import { ServiceRepository } from '~/services/services';
-import { SidePanelTreeCategory } from '~/store/side-panel-tree/side-panel-tree-actions';
+import { SidePanelTreeCategory, activateSidePanelTreeItem } from '~/store/side-panel-tree/side-panel-tree-actions';
import { updateResources } from '../resources/resources-actions';
import { ResourceKind } from '~/models/resource';
@@ -55,7 +55,16 @@ export const setSharedWithMeBreadcrumbs = (uuid: string) =>
dispatch(setBreadcrumbs(breadrumbs));
};
-export const setProjectBreadcrumbs = setSidePanelBreadcrumbs;
+export const setProjectBreadcrumbs = (uuid: string) =>
+ (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
+ const ancestors = getSidePanelTreeNodeAncestorsIds(uuid)(getState().treePicker);
+ if (ancestors.find(uuid => uuid === services.authService.getUuid())) {
+ dispatch(setSidePanelBreadcrumbs(uuid));
+ } else {
+ dispatch(setSharedWithMeBreadcrumbs(uuid));
+ dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.SHARED_WITH_ME));
+ }
+ };
export const setCollectionBreadcrumbs = (collectionUuid: string) =>
(dispatch: Dispatch, getState: () => RootState) => {
diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts
index 22b7b48..c79dc48 100644
--- a/src/store/workbench/workbench-actions.ts
+++ b/src/store/workbench/workbench-actions.ts
@@ -85,13 +85,7 @@ export const loadProject = (uuid: string) =>
async (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
dispatch(openProjectPanel(uuid));
await dispatch(activateSidePanelTreeItem(uuid));
- const ancestors = getSidePanelTreeNodeAncestorsIds(uuid)(getState().treePicker);
- if (ancestors.find(uuid => uuid === services.authService.getUuid())) {
- dispatch(setProjectBreadcrumbs(uuid));
- } else {
- dispatch(setSharedWithMeBreadcrumbs(uuid));
- dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.SHARED_WITH_ME));
- }
+ dispatch(setProjectBreadcrumbs(uuid));
dispatch(loadDetailsPanel(uuid));
};
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list