projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
18975: Makes UUID & PDH clicking on log viewer to open a new tab.
[arvados-workbench2.git]
/
src
/
store
/
navigation
/
navigation-action.ts
diff --git
a/src/store/navigation/navigation-action.ts
b/src/store/navigation/navigation-action.ts
index 19cc36ae6d51752fb92150495a22115648ac2f72..146530cae8e3ffaf530da19ca3be07743026c78f 100644
(file)
--- a/
src/store/navigation/navigation-action.ts
+++ b/
src/store/navigation/navigation-action.ts
@@
-6,13
+6,15
@@
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 { push } from "react-router-redux";
import { ResourceKind, extractUuidKind } from 'models/resource';
import { SidePanelTreeCategory } from '../side-panel-tree/side-panel-tree-actions';
-import { Routes, get
ProcessLogUrl, getGroupUrl, getNav
Url } from 'routes/routes';
+import { Routes, get
GroupUrl, getNavUrl, getUserProfile
Url } from 'routes/routes';
import { RootState } from 'store/store';
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 { 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) =>
+
export
const navigationNotAvailable = (id: string) =>
snackbarActions.OPEN_SNACKBAR({
message: `${id} not available`,
hideDuration: 3000,
snackbarActions.OPEN_SNACKBAR({
message: `${id} not available`,
hideDuration: 3000,
@@
-39,6
+41,9
@@
export const navigateTo = (uuid: string) =>
case ResourceKind.VIRTUAL_MACHINE:
dispatch<any>(navigateToAdminVirtualMachines);
return;
case ResourceKind.VIRTUAL_MACHINE:
dispatch<any>(navigateToAdminVirtualMachines);
return;
+ case ResourceKind.WORKFLOW:
+ dispatch<any>(openDetailsPanel(uuid));
+ return;
}
switch (uuid) {
}
switch (uuid) {
@@
-57,9
+62,6
@@
export const navigateTo = (uuid: string) =>
case SidePanelTreeCategory.SHARED_WITH_ME:
dispatch(navigateToSharedWithMe);
return;
case SidePanelTreeCategory.SHARED_WITH_ME:
dispatch(navigateToSharedWithMe);
return;
- case SidePanelTreeCategory.WORKFLOWS:
- dispatch(navigateToWorkflows);
- return;
case SidePanelTreeCategory.TRASH:
dispatch(navigateToTrash);
return;
case SidePanelTreeCategory.TRASH:
dispatch(navigateToTrash);
return;
@@
-69,6
+71,12
@@
export const navigateTo = (uuid: string) =>
case SidePanelTreeCategory.ALL_PROCESSES:
dispatch(navigateToAllProcesses);
return;
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));
}
dispatch(navigationNotAvailable(uuid));
@@
-99,8
+107,6
@@
export const pushOrGoto = (url: string): AnyAction => {
};
};
-export const navigateToProcessLogs = compose(push, getProcessLogUrl);
-
export const navigateToRootProject = (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
navigateTo(SidePanelTreeCategory.PROJECTS)(dispatch, getState);
};
export const navigateToRootProject = (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
navigateTo(SidePanelTreeCategory.PROJECTS)(dispatch, getState);
};
@@
-137,6
+143,8
@@
export const navigateToKeepServices = push(Routes.KEEP_SERVICES);
export const navigateToUsers = push(Routes.USERS);
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);
export const navigateToApiClientAuthorizations = push(Routes.API_CLIENT_AUTHORIZATIONS);
export const navigateToGroups = push(Routes.GROUPS);