X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/5c8a5dd07252ed2ac431c53fccc9e2fb649c3014..bf6ffb898a38a806ea0dd98daca7b3801923b62f:/src/store/navigation/navigation-action.ts diff --git a/src/store/navigation/navigation-action.ts b/src/store/navigation/navigation-action.ts index 49f56591..c8811bf4 100644 --- a/src/store/navigation/navigation-action.ts +++ b/src/store/navigation/navigation-action.ts @@ -6,11 +6,13 @@ import { Dispatch, compose, AnyAction } from 'redux'; import { push } from "react-router-redux"; import { ResourceKind, extractUuidKind } from 'models/resource'; import { SidePanelTreeCategory } from '../side-panel-tree/side-panel-tree-actions'; -import { Routes, getGroupUrl, getNavUrl } from 'routes/routes'; +import { Routes, getGroupUrl, getNavUrl, getUserProfileUrl } from 'routes/routes'; import { RootState } from 'store/store'; +import { openDetailsPanel } from 'store/details-panel/details-panel-action'; 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({ @@ -39,6 +41,9 @@ export const navigateTo = (uuid: string) => case ResourceKind.VIRTUAL_MACHINE: dispatch(navigateToAdminVirtualMachines); return; + case ResourceKind.WORKFLOW: + dispatch(openDetailsPanel(uuid)); + return; } switch (uuid) { @@ -57,9 +62,6 @@ export const navigateTo = (uuid: string) => case SidePanelTreeCategory.SHARED_WITH_ME: dispatch(navigateToSharedWithMe); return; - case SidePanelTreeCategory.WORKFLOWS: - dispatch(navigateToWorkflows); - return; case SidePanelTreeCategory.TRASH: dispatch(navigateToTrash); return; @@ -69,6 +71,12 @@ export const navigateTo = (uuid: string) => 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)); @@ -135,6 +143,8 @@ export const navigateToKeepServices = push(Routes.KEEP_SERVICES); 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);