X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/0a97d1cc5eedb11445af4b675c57b8cbdb4f1af3..dab7bbaf5fdee0e4e56c0bbfe14da5ad42b5869d:/src/routes/route-change-handlers.ts diff --git a/src/routes/route-change-handlers.ts b/src/routes/route-change-handlers.ts index 33e0bef7..c7f3555b 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 { loadProject, loadCollection, loadFavorites, loadTrash, loadProcess, loadProcessLog } from '~/store/workbench/workbench-actions'; +import { matchProcessRoute, matchProcessLogRoute, matchProjectRoute, matchCollectionRoute, matchFavoritesRoute, matchTrashRoute, matchRootRoute, matchSharedWithMeRoute, matchRunProcessRoute, matchWorkflowRoute, matchSearchResultsRoute, matchSshKeysRoute, matchRepositoriesRoute } from './routes'; +import { loadProject, loadCollection, loadFavorites, loadTrash, loadProcess, loadProcessLog, loadSshKeys, loadRepositories } 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, loadSearchResults } from '~//store/workbench/workbench-actions'; export const addRouteChangeHandlers = (history: History, store: RootStore) => { const handler = handleLocationChange(store); @@ -24,7 +23,12 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { const trashMatch = matchTrashRoute(pathname); const processMatch = matchProcessRoute(pathname); const processLogMatch = matchProcessLogRoute(pathname); + const repositoryMatch = matchRepositoriesRoute(pathname); + const searchResultsMatch = matchSearchResultsRoute(pathname); const sharedWithMeMatch = matchSharedWithMeRoute(pathname); + const runProcessMatch = matchRunProcessRoute(pathname); + const workflowMatch = matchWorkflowRoute(pathname); + const sshKeysMatch = matchSshKeysRoute(pathname); if (projectMatch) { store.dispatch(loadProject(projectMatch.params.id)); @@ -42,5 +46,15 @@ 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); + } else if (searchResultsMatch) { + store.dispatch(loadSearchResults); + } else if(repositoryMatch) { + store.dispatch(loadRepositories); + } else if (sshKeysMatch) { + store.dispatch(loadSshKeys); } };