X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/4ea2ff188ec745966387ce8bbe14880bfeede863..ca091dbfbc7df1a3f81eca2b16925b3225d43138:/src/store/workbench/workbench-actions.ts diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts index 091a8ccc..e42e6c3e 100644 --- a/src/store/workbench/workbench-actions.ts +++ b/src/store/workbench/workbench-actions.ts @@ -57,6 +57,14 @@ import { searchResultsPanelActions, loadSearchResultsPanel } from '~/store/searc import { searchResultsPanelColumns } from '~/views/search-results-panel/search-results-panel-view'; import { loadVirtualMachinesPanel } from '~/store/virtual-machines/virtual-machines-actions'; import { loadRepositoriesPanel } from '~/store/repositories/repositories-actions'; +import { loadKeepServicesPanel } from '~/store/keep-services/keep-services-actions'; +import { loadUsersPanel, userBindedActions } from '~/store/users/users-actions'; +import { loadLinkPanel, linkPanelActions } from '~/store/link-panel/link-panel-actions'; +import { loadComputeNodesPanel, computeNodesActions } from '~/store/compute-nodes/compute-nodes-actions'; +import { linkPanelColumns } from '~/views/link-panel/link-panel-root'; +import { userPanelColumns } from '~/views/user-panel/user-panel'; +import { computeNodePanelColumns } from '~/views/compute-node-panel/compute-node-panel-root'; +import { loadApiClientAuthorizationsPanel } from '~/store/api-client-authorizations/api-client-authorizations-actions'; export const WORKBENCH_LOADING_SCREEN = 'workbenchLoadingScreen'; @@ -76,7 +84,6 @@ const handleFirstTimeLoad = (action: any) => } }; - export const loadWorkbench = () => async (dispatch: Dispatch, getState: () => RootState) => { dispatch(progressIndicatorActions.START_WORKING(WORKBENCH_LOADING_SCREEN)); @@ -91,6 +98,9 @@ export const loadWorkbench = () => dispatch(sharedWithMePanelActions.SET_COLUMNS({ columns: projectPanelColumns })); dispatch(workflowPanelActions.SET_COLUMNS({ columns: workflowPanelColumns })); dispatch(searchResultsPanelActions.SET_COLUMNS({ columns: searchResultsPanelColumns })); + dispatch(userBindedActions.SET_COLUMNS({ columns: userPanelColumns })); + dispatch(linkPanelActions.SET_COLUMNS({ columns: linkPanelColumns })); + dispatch(computeNodesActions.SET_COLUMNS({ columns: computeNodePanelColumns })); dispatch(initSidePanelTree()); if (router.location) { const match = matchRootRoute(router.location.pathname); @@ -128,7 +138,10 @@ export const loadProject = (uuid: string) => const userUuid = services.authService.getUuid(); dispatch(setIsProjectPanelTrashed(false)); if (userUuid) { - if (userUuid !== uuid) { + if (extractUuidKind(uuid) === ResourceKind.USER && userUuid !== uuid) { + // Load another users home projects + dispatch(finishLoadingProject(uuid)); + } else if (userUuid !== uuid) { const match = await loadGroupContentsResource({ uuid, userUuid, services }); match({ OWNED: async project => { @@ -394,12 +407,17 @@ export const loadSearchResults = handleFirstTimeLoad( await dispatch(loadSearchResultsPanel()); }); +export const loadLinks = handleFirstTimeLoad( + async (dispatch: Dispatch) => { + await dispatch(loadLinkPanel()); + }); + export const loadVirtualMachines = handleFirstTimeLoad( async (dispatch: Dispatch) => { await dispatch(loadVirtualMachinesPanel()); dispatch(setBreadcrumbs([{ label: 'Virtual Machines' }])); }); - + export const loadRepositories = handleFirstTimeLoad( async (dispatch: Dispatch) => { await dispatch(loadRepositoriesPanel()); @@ -412,8 +430,29 @@ export const loadSshKeys = handleFirstTimeLoad( }); export const loadMyAccount = handleFirstTimeLoad( + (dispatch: Dispatch) => { + dispatch(loadMyAccountPanel()); + }); + +export const loadKeepServices = handleFirstTimeLoad( + async (dispatch: Dispatch) => { + await dispatch(loadKeepServicesPanel()); + }); + +export const loadUsers = handleFirstTimeLoad( + async (dispatch: Dispatch) => { + await dispatch(loadUsersPanel()); + dispatch(setBreadcrumbs([{ label: 'Users' }])); + }); + +export const loadComputeNodes = handleFirstTimeLoad( + async (dispatch: Dispatch) => { + await dispatch(loadComputeNodesPanel()); + }); + +export const loadApiClientAuthorizations = handleFirstTimeLoad( async (dispatch: Dispatch) => { - await dispatch(loadMyAccountPanel()); + await dispatch(loadApiClientAuthorizationsPanel()); }); const finishLoadingProject = (project: GroupContentsResource | string) =>