X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/a74d278febca225076a72413a8343e13f5488a58..41f6f1e495c82fcfa79b87cf718fa2e9cd91c726:/src/store/navigation/navigation-action.ts diff --git a/src/store/navigation/navigation-action.ts b/src/store/navigation/navigation-action.ts index 7b55f897..1cdb6784 100644 --- a/src/store/navigation/navigation-action.ts +++ b/src/store/navigation/navigation-action.ts @@ -4,14 +4,14 @@ import { Dispatch, compose, AnyAction } from 'redux'; import { push } from "react-router-redux"; -import { ResourceKind, extractUuidKind } from '~/models/resource'; +import { ResourceKind, extractUuidKind } from 'models/resource'; import { SidePanelTreeCategory } from '../side-panel-tree/side-panel-tree-actions'; -import { Routes, getProcessLogUrl, getGroupUrl, getNavUrl } from '~/routes/routes'; -import { RootState } from '~/store/store'; -import { ServiceRepository } from '~/services/services'; -import { GROUPS_PANEL_LABEL } from '~/store/breadcrumbs/breadcrumbs-actions'; -import { pluginConfig } from '~/plugins'; -import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions'; +import { Routes, getGroupUrl, getNavUrl, getUserProfileUrl } from 'routes/routes'; +import { RootState } from 'store/store'; +import { ServiceRepository } from 'services/services'; +import { pluginConfig } from 'plugins'; +import { snackbarActions, SnackbarKind } from 'store/snackbar/snackbar-actions'; +import { USERS_PANEL_LABEL, MY_ACCOUNT_PANEL_LABEL } from 'store/breadcrumbs/breadcrumbs-actions'; const navigationNotAvailable = (id: string) => snackbarActions.OPEN_SNACKBAR({ @@ -64,12 +64,18 @@ export const navigateTo = (uuid: string) => case SidePanelTreeCategory.TRASH: dispatch(navigateToTrash); return; - case GROUPS_PANEL_LABEL: + case SidePanelTreeCategory.GROUPS: dispatch(navigateToGroups); return; case SidePanelTreeCategory.ALL_PROCESSES: dispatch(navigateToAllProcesses); return; + case USERS_PANEL_LABEL: + dispatch(navigateToUsers); + return; + case MY_ACCOUNT_PANEL_LABEL: + dispatch(navigateToMyAccount); + return; } dispatch(navigationNotAvailable(uuid)); @@ -100,8 +106,6 @@ export const pushOrGoto = (url: string): AnyAction => { }; -export const navigateToProcessLogs = compose(push, getProcessLogUrl); - export const navigateToRootProject = (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { navigateTo(SidePanelTreeCategory.PROJECTS)(dispatch, getState); }; @@ -136,10 +140,10 @@ export const navigateToLinkAccount = push(Routes.LINK_ACCOUNT); export const navigateToKeepServices = push(Routes.KEEP_SERVICES); -export const navigateToComputeNodes = push(Routes.COMPUTE_NODES); - export const navigateToUsers = push(Routes.USERS); +export const navigateToUserProfile = compose(push, getUserProfileUrl); + export const navigateToApiClientAuthorizations = push(Routes.API_CLIENT_AUTHORIZATIONS); export const navigateToGroups = push(Routes.GROUPS);