X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/5f27c58e1c34d147786de6104ead8a57c48f7d2e..e79b7364ea28b6f0719c9adf409ba1217b9ccac8:/src/routes/route-change-handlers.ts diff --git a/src/routes/route-change-handlers.ts b/src/routes/route-change-handlers.ts index 33e0bef7..af3bdab4 100644 --- a/src/routes/route-change-handlers.ts +++ b/src/routes/route-change-handlers.ts @@ -4,11 +4,10 @@ import { History, Location } from 'history'; import { RootStore } from '~/store/store'; -import { matchProcessRoute, matchProcessLogRoute, matchProjectRoute, matchCollectionRoute, matchFavoritesRoute, matchTrashRoute, matchRootRoute, matchSharedWithMeRoute } 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 { navigateToSharedWithMe } from '../store/navigation/navigation-action'; -import { loadSharedWithMe } from '../store/workbench/workbench-actions'; +import { loadSharedWithMe, loadRunProcess, loadWorkflow } from '../store/workbench/workbench-actions'; export const addRouteChangeHandlers = (history: History, store: RootStore) => { const handler = handleLocationChange(store); @@ -25,6 +24,8 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { 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)); @@ -42,5 +43,9 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { store.dispatch(navigateToRootProject); } else if (sharedWithMeMatch) { store.dispatch(loadSharedWithMe); + } else if (runProcessMatch) { + store.dispatch(loadRunProcess); + } else if (workflowMatch) { + store.dispatch(loadWorkflow); } };