projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Create SELECT_WORKFLOW_PRESET action
[arvados-workbench2.git]
/
src
/
store
/
workbench
/
workbench-actions.ts
diff --git
a/src/store/workbench/workbench-actions.ts
b/src/store/workbench/workbench-actions.ts
index 49c50f288982c2140243948b2ccc17dcda46aa3b..bc5eac6c8bcaa41ea74ea96ab4de5aeb8163837a 100644
(file)
--- a/
src/store/workbench/workbench-actions.ts
+++ b/
src/store/workbench/workbench-actions.ts
@@
-58,7
+58,10
@@
import { searchResultsPanelColumns } from '~/views/search-results-panel/search-r
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 { 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 { userPanelColumns } from '~/views/user-panel/user-panel';
import { loadComputeNodesPanel } from '~/store/compute-nodes/compute-nodes-actions';
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';
export const WORKBENCH_LOADING_SCREEN = 'workbenchLoadingScreen';
@@
-78,7
+81,6
@@
const handleFirstTimeLoad = (action: any) =>
}
};
}
};
-
export const loadWorkbench = () =>
async (dispatch: Dispatch, getState: () => RootState) => {
dispatch(progressIndicatorActions.START_WORKING(WORKBENCH_LOADING_SCREEN));
export const loadWorkbench = () =>
async (dispatch: Dispatch, getState: () => RootState) => {
dispatch(progressIndicatorActions.START_WORKING(WORKBENCH_LOADING_SCREEN));
@@
-93,6
+95,7
@@
export const loadWorkbench = () =>
dispatch(sharedWithMePanelActions.SET_COLUMNS({ columns: projectPanelColumns }));
dispatch(workflowPanelActions.SET_COLUMNS({ columns: workflowPanelColumns }));
dispatch(searchResultsPanelActions.SET_COLUMNS({ columns: searchResultsPanelColumns }));
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<any>(initSidePanelTree());
if (router.location) {
const match = matchRootRoute(router.location.pathname);
dispatch<any>(initSidePanelTree());
if (router.location) {
const match = matchRootRoute(router.location.pathname);
@@
-130,7
+133,10
@@
export const loadProject = (uuid: string) =>
const userUuid = services.authService.getUuid();
dispatch(setIsProjectPanelTrashed(false));
if (userUuid) {
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 => {
const match = await loadGroupContentsResource({ uuid, userUuid, services });
match({
OWNED: async project => {
@@
-401,7
+407,7
@@
export const loadVirtualMachines = handleFirstTimeLoad(
await dispatch(loadVirtualMachinesPanel());
dispatch(setBreadcrumbs([{ label: 'Virtual Machines' }]));
});
await dispatch(loadVirtualMachinesPanel());
dispatch(setBreadcrumbs([{ label: 'Virtual Machines' }]));
});
-
+
export const loadRepositories = handleFirstTimeLoad(
async (dispatch: Dispatch<any>) => {
await dispatch(loadRepositoriesPanel());
export const loadRepositories = handleFirstTimeLoad(
async (dispatch: Dispatch<any>) => {
await dispatch(loadRepositoriesPanel());
@@
-423,11
+429,22
@@
export const loadKeepServices = handleFirstTimeLoad(
await dispatch(loadKeepServicesPanel());
});
await dispatch(loadKeepServicesPanel());
});
+export const loadUsers = handleFirstTimeLoad(
+ async (dispatch: Dispatch<any>) => {
+ await dispatch(loadUsersPanel());
+ dispatch(setBreadcrumbs([{ label: 'Users' }]));
+ });
+
export const loadComputeNodes = handleFirstTimeLoad(
async (dispatch: Dispatch<any>) => {
await dispatch(loadComputeNodesPanel());
});
export const loadComputeNodes = handleFirstTimeLoad(
async (dispatch: Dispatch<any>) => {
await dispatch(loadComputeNodesPanel());
});
+export const loadApiClientAuthorizations = handleFirstTimeLoad(
+ async (dispatch: Dispatch<any>) => {
+ await dispatch(loadApiClientAuthorizationsPanel());
+ });
+
const finishLoadingProject = (project: GroupContentsResource | string) =>
async (dispatch: Dispatch<any>) => {
const uuid = typeof project === 'string' ? project : project.uuid;
const finishLoadingProject = (project: GroupContentsResource | string) =>
async (dispatch: Dispatch<any>) => {
const uuid = typeof project === 'string' ? project : project.uuid;