X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/459c67708a8f880ec98ebb9eecc10299acb91d68..295d62fd5e44819cb55737a86c42db633e097cd8:/src/store/navigation/navigation-action.ts diff --git a/src/store/navigation/navigation-action.ts b/src/store/navigation/navigation-action.ts index 33181b37..9aa4a32c 100644 --- a/src/store/navigation/navigation-action.ts +++ b/src/store/navigation/navigation-action.ts @@ -8,9 +8,10 @@ import { ResourceKind, extractUuidKind } from '~/models/resource'; import { getCollectionUrl } from "~/models/collection"; import { getProjectUrl } from "~/models/project"; import { SidePanelTreeCategory } from '../side-panel-tree/side-panel-tree-actions'; -import { Routes, getProcessUrl, getProcessLogUrl } from '~/routes/routes'; +import { Routes, getProcessUrl, getProcessLogUrl, getGroupUrl } from '~/routes/routes'; import { RootState } from '~/store/store'; import { ServiceRepository } from '~/services/services'; +import { GROUPS_PANEL_LABEL } from '~/store/breadcrumbs/breadcrumbs-actions'; export const navigateTo = (uuid: string) => async (dispatch: Dispatch) => { @@ -21,16 +22,28 @@ export const navigateTo = (uuid: string) => dispatch(navigateToCollection(uuid)); } else if (kind === ResourceKind.CONTAINER_REQUEST) { dispatch(navigateToProcess(uuid)); - } + } if (uuid === SidePanelTreeCategory.FAVORITES) { dispatch(navigateToFavorites); + } else if (uuid === SidePanelTreeCategory.SHARED_WITH_ME) { + dispatch(navigateToSharedWithMe); + } else if (uuid === SidePanelTreeCategory.WORKFLOWS) { + dispatch(navigateToWorkflows); + } else if (uuid === SidePanelTreeCategory.TRASH) { + dispatch(navigateToTrash); + } else if (uuid === GROUPS_PANEL_LABEL) { + dispatch(navigateToGroups); } }; +export const navigateToRoot = push(Routes.ROOT); + export const navigateToFavorites = push(Routes.FAVORITES); export const navigateToTrash = push(Routes.TRASH); +export const navigateToWorkflows = push(Routes.WORKFLOWS); + export const navigateToProject = compose(push, getProjectUrl); export const navigateToCollection = compose(push, getCollectionUrl); @@ -41,7 +54,33 @@ export const navigateToProcessLogs = compose(push, getProcessLogUrl); export const navigateToRootProject = (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { const rootProjectUuid = services.authService.getUuid(); - if(rootProjectUuid){ + if (rootProjectUuid) { dispatch(navigateToProject(rootProjectUuid)); } -}; \ No newline at end of file +}; + +export const navigateToSharedWithMe = push(Routes.SHARED_WITH_ME); + +export const navigateToRunProcess = push(Routes.RUN_PROCESS); + +export const navigateToSearchResults = push(Routes.SEARCH_RESULTS); + +export const navigateToVirtualMachines = push(Routes.VIRTUAL_MACHINES); + +export const navigateToRepositories = push(Routes.REPOSITORIES); + +export const navigateToSshKeys= push(Routes.SSH_KEYS); + +export const navigateToMyAccount = push(Routes.MY_ACCOUNT); + +export const navigateToKeepServices = push(Routes.KEEP_SERVICES); + +export const navigateToComputeNodes = push(Routes.COMPUTE_NODES); + +export const navigateToUsers = push(Routes.USERS); + +export const navigateToApiClientAuthorizations = push(Routes.API_CLIENT_AUTHORIZATIONS); + +export const navigateToGroups = push(Routes.GROUPS); + +export const navigateToGroupDetails = compose(push, getGroupUrl);