projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
workflow-file-selection
[arvados.git]
/
src
/
routes
/
route-change-handlers.ts
diff --git
a/src/routes/route-change-handlers.ts
b/src/routes/route-change-handlers.ts
index 00fb4bc05acbfcf8a4dc47e3c20f19516443cf19..af3bdab4b092ca61781747eb24a91733fdd20dd0 100644
(file)
--- a/
src/routes/route-change-handlers.ts
+++ b/
src/routes/route-change-handlers.ts
@@
-4,9
+4,10
@@
import { History, Location } from 'history';
import { RootStore } from '~/store/store';
import { History, Location } from 'history';
import { RootStore } from '~/store/store';
-import { matchProcessRoute, matchProcessLogRoute, matchProjectRoute, matchCollectionRoute, matchFavoritesRoute, matchTrashRoute, matchRootRoute } from './routes';
+import { matchProcessRoute, matchProcessLogRoute, matchProjectRoute, matchCollectionRoute, matchFavoritesRoute, matchTrashRoute, matchRootRoute
, matchSharedWithMeRoute, matchRunProcessRoute, matchWorkflowRoute
} from './routes';
import { loadProject, loadCollection, loadFavorites, loadTrash, loadProcess, loadProcessLog } from '~/store/workbench/workbench-actions';
import { navigateToRootProject } from '~/store/navigation/navigation-action';
import { loadProject, loadCollection, loadFavorites, loadTrash, loadProcess, loadProcessLog } from '~/store/workbench/workbench-actions';
import { navigateToRootProject } from '~/store/navigation/navigation-action';
+import { loadSharedWithMe, loadRunProcess, loadWorkflow } from '../store/workbench/workbench-actions';
export const addRouteChangeHandlers = (history: History, store: RootStore) => {
const handler = handleLocationChange(store);
export const addRouteChangeHandlers = (history: History, store: RootStore) => {
const handler = handleLocationChange(store);
@@
-22,7
+23,10
@@
const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => {
const trashMatch = matchTrashRoute(pathname);
const processMatch = matchProcessRoute(pathname);
const processLogMatch = matchProcessLogRoute(pathname);
const trashMatch = matchTrashRoute(pathname);
const processMatch = matchProcessRoute(pathname);
const processLogMatch = matchProcessLogRoute(pathname);
-
+ const sharedWithMeMatch = matchSharedWithMeRoute(pathname);
+ const runProcessMatch = matchRunProcessRoute(pathname);
+ const workflowMatch = matchWorkflowRoute(pathname);
+
if (projectMatch) {
store.dispatch(loadProject(projectMatch.params.id));
} else if (collectionMatch) {
if (projectMatch) {
store.dispatch(loadProject(projectMatch.params.id));
} else if (collectionMatch) {
@@
-37,5
+41,11
@@
const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => {
store.dispatch(loadProcessLog(processLogMatch.params.id));
} else if (rootMatch) {
store.dispatch(navigateToRootProject);
store.dispatch(loadProcessLog(processLogMatch.params.id));
} else if (rootMatch) {
store.dispatch(navigateToRootProject);
+ } else if (sharedWithMeMatch) {
+ store.dispatch(loadSharedWithMe);
+ } else if (runProcessMatch) {
+ store.dispatch(loadRunProcess);
+ } else if (workflowMatch) {
+ store.dispatch(loadWorkflow);
}
};
}
};