X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/89c3c647797787377f4d950b38d320ee3b28e92c..7e7d0ab455b9e37de66a2d311419454159a4b193:/src/store/workbench/workbench-actions.ts diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts index 5e33661c..85540f0b 100644 --- a/src/store/workbench/workbench-actions.ts +++ b/src/store/workbench/workbench-actions.ts @@ -40,6 +40,7 @@ import { loadSharedWithMePanel } from '~/store/shared-with-me-panel/shared-with- import { CopyFormDialogData } from '~/store/copy-dialog/copy-dialog'; import { loadWorkflowPanel, workflowPanelActions } from '~/store/workflow-panel/workflow-panel-actions'; import { loadSshKeysPanel } from '~/store/auth/auth-action'; +import { loadMyAccountPanel } from '~/store/my-account/my-account-panel-actions'; import { workflowPanelColumns } from '~/views/workflow-panel/workflow-panel-view'; import { progressIndicatorActions } from '~/store/progress-indicator/progress-indicator-actions'; import { getProgressIndicator } from '~/store/progress-indicator/progress-indicator-reducer'; @@ -54,7 +55,15 @@ import { collectionPanelActions } from "~/store/collection-panel/collection-pane import { CollectionResource } from "~/models/collection"; import { searchResultsPanelActions, loadSearchResultsPanel } from '~/store/search-results-panel/search-results-panel-actions'; 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 { linkPanelColumns } from '~/views/link-panel/link-panel-root'; +import { userPanelColumns } from '~/views/user-panel/user-panel'; +import { loadComputeNodesPanel } from '~/store/compute-nodes/compute-nodes-actions'; +import { loadApiClientAuthorizationsPanel } from '~/store/api-client-authorizations/api-client-authorizations-actions'; export const WORKBENCH_LOADING_SCREEN = 'workbenchLoadingScreen'; @@ -74,7 +83,6 @@ const handleFirstTimeLoad = (action: any) => } }; - export const loadWorkbench = () => async (dispatch: Dispatch, getState: () => RootState) => { dispatch(progressIndicatorActions.START_WORKING(WORKBENCH_LOADING_SCREEN)); @@ -89,6 +97,8 @@ 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(initSidePanelTree()); if (router.location) { const match = matchRootRoute(router.location.pathname); @@ -126,7 +136,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 => { @@ -392,6 +405,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()); @@ -403,6 +427,32 @@ export const loadSshKeys = handleFirstTimeLoad( await dispatch(loadSshKeysPanel()); }); +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(loadApiClientAuthorizationsPanel()); + }); + const finishLoadingProject = (project: GroupContentsResource | string) => async (dispatch: Dispatch) => { const uuid = typeof project === 'string' ? project : project.uuid;