X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/96fdc9e2e344e86378dd156593d8166f309ea1af..dcc13bac8192a1a1075f5596d0b014441ae5b33a:/src/routes/route-change-handlers.ts diff --git a/src/routes/route-change-handlers.ts b/src/routes/route-change-handlers.ts index 237b6d96..bdc1ddc0 100644 --- a/src/routes/route-change-handlers.ts +++ b/src/routes/route-change-handlers.ts @@ -11,6 +11,7 @@ import { dialogActions } from 'store/dialog/dialog-actions'; import { contextMenuActions } from 'store/context-menu/context-menu-actions'; import { searchBarActions } from 'store/search-bar/search-bar-actions'; import { pluginConfig } from 'plugins'; +import { openProjectPanel } from 'store/project-panel/project-panel-action'; export const addRouteChangeHandlers = (history: History, store: RootStore) => { const handler = handleLocationChange(store); @@ -47,6 +48,7 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { const linksMatch = Routes.matchLinksRoute(pathname); const collectionsContentAddressMatch = Routes.matchCollectionsContentAddressRoute(pathname); const allProcessesMatch = Routes.matchAllProcessesRoute(pathname); + const registeredWorkflowMatch = Routes.matchRegisteredWorkflowRoute(pathname); store.dispatch(dialogActions.CLOSE_ALL_DIALOGS()); store.dispatch(contextMenuActions.CLOSE_CONTEXT_MENU()); @@ -58,8 +60,10 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { } } + document.title = `Arvados (${store.getState().auth.config.uuidPrefix}) - ${pathname.slice(1)}`; + if (projectMatch) { - store.dispatch(WorkbenchActions.loadProject(projectMatch.params.id)); + store.dispatch(openProjectPanel(projectMatch.params.id)); } else if (collectionMatch) { store.dispatch(WorkbenchActions.loadCollection(collectionMatch.params.id)); } else if (favoriteMatch) { @@ -112,5 +116,7 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { store.dispatch(WorkbenchActions.loadCollectionContentAddress); } else if (allProcessesMatch) { store.dispatch(WorkbenchActions.loadAllProcesses()); + } else if (registeredWorkflowMatch) { + store.dispatch(WorkbenchActions.loadRegisteredWorkflow(registeredWorkflowMatch.params.id)); } };