From: Janicki Artur Date: Fri, 7 Dec 2018 09:48:35 +0000 (+0100) Subject: Merge branch 'master' of git.curoverse.com:arvados-workbench2 into 14500_admin_api_tokens X-Git-Tag: 1.4.0~94^2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/3865bd152892a1ad5f85f23d085268837db8c9ee Merge branch 'master' of git.curoverse.com:arvados-workbench2 into 14500_admin_api_tokens refs #2 14500 Arvados-DCO-1.1-Signed-off-by: Janicki Artur --- 3865bd152892a1ad5f85f23d085268837db8c9ee diff --cc src/routes/route-change-handlers.ts index 1a88ff20,68de3107..a733e42f --- a/src/routes/route-change-handlers.ts +++ b/src/routes/route-change-handlers.ts @@@ -31,7 -31,7 +31,8 @@@ const handleLocationChange = (store: Ro const sshKeysMatch = Routes.matchSshKeysRoute(pathname); const keepServicesMatch = Routes.matchKeepServicesRoute(pathname); const computeNodesMatch = Routes.matchComputeNodesRoute(pathname); + const apiClientAuthorizationsMatch = Routes.matchApiClientAuthorizationsRoute(pathname); + const myAccountMatch = Routes.matchMyAccountRoute(pathname); if (projectMatch) { store.dispatch(WorkbenchActions.loadProject(projectMatch.params.id)); @@@ -65,7 -65,7 +66,9 @@@ store.dispatch(WorkbenchActions.loadKeepServices); } else if (computeNodesMatch) { store.dispatch(WorkbenchActions.loadComputeNodes); + } else if (apiClientAuthorizationsMatch) { + store.dispatch(WorkbenchActions.loadApiClientAuthorizations); + } else if (myAccountMatch) { + store.dispatch(WorkbenchActions.loadMyAccount); } }; diff --cc src/routes/routes.ts index 1fda25d0,71d920ab..7f15a8de --- a/src/routes/routes.ts +++ b/src/routes/routes.ts @@@ -23,9 -23,9 +23,10 @@@ export const Routes = WORKFLOWS: '/workflows', SEARCH_RESULTS: '/search-results', SSH_KEYS: `/ssh-keys`, + MY_ACCOUNT: '/my-account', KEEP_SERVICES: `/keep-services`, - COMPUTE_NODES: `/nodes` + COMPUTE_NODES: `/nodes`, + API_CLIENT_AUTHORIZATIONS: `/api_client_authorizations` }; export const getResourceUrl = (uuid: string) => { diff --cc src/store/navigation/navigation-action.ts index e1e8cef5,a3652726..067a9ac4 --- a/src/store/navigation/navigation-action.ts +++ b/src/store/navigation/navigation-action.ts @@@ -68,8 -68,8 +68,10 @@@ export const navigateToRepositories = p 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 navigateToComputeNodes = push(Routes.COMPUTE_NODES); + +export const navigateToApiClientAuthorizations = push(Routes.API_CLIENT_AUTHORIZATIONS); diff --cc src/views-components/main-app-bar/account-menu.tsx index f385b9f6,ee726f3d..415cba37 --- a/src/views-components/main-app-bar/account-menu.tsx +++ b/src/views-components/main-app-bar/account-menu.tsx @@@ -12,10 -12,7 +12,10 @@@ import { logout } from '~/store/auth/au import { RootState } from "~/store/store"; import { openCurrentTokenDialog } from '~/store/current-token-dialog/current-token-dialog-actions'; import { openRepositoriesPanel } from "~/store/repositories/repositories-actions"; -import { navigateToSshKeys, navigateToKeepServices, navigateToComputeNodes, navigateToMyAccount } from '~/store/navigation/navigation-action'; +import { + navigateToSshKeys, navigateToKeepServices, navigateToComputeNodes, - navigateToApiClientAuthorizations ++ navigateToApiClientAuthorizations, navigateToMyAccount +} from '~/store/navigation/navigation-action'; import { openVirtualMachines } from "~/store/virtual-machines/virtual-machines-actions"; interface AccountMenuProps { @@@ -40,10 -37,9 +40,10 @@@ export const AccountMenu = connect(mapS dispatch(openRepositoriesPanel())}>Repositories dispatch(openCurrentTokenDialog)}>Current token dispatch(navigateToSshKeys)}>Ssh Keys + { user.isAdmin && dispatch(navigateToApiClientAuthorizations)}>Api Tokens } { user.isAdmin && dispatch(navigateToKeepServices)}>Keep Services } { user.isAdmin && dispatch(navigateToComputeNodes)}>Compute Nodes } - My account + dispatch(navigateToMyAccount)}>My account dispatch(logout())}>Logout : null); diff --cc src/views/workbench/workbench.tsx index 1f5a5035,5efffa19..3cd040f7 --- a/src/views/workbench/workbench.tsx +++ b/src/views/workbench/workbench.tsx @@@ -145,7 -142,7 +146,8 @@@ export const WorkbenchPanel + +