LINKS: '/links',
PUBLIC_FAVORITES: '/public-favorites',
COLLECTIONS_CONTENT_ADDRESS: '/collections/:id',
+ ALL_PROCESSES: '/all_processes',
};
export const getResourceUrl = (uuid: string) => {
export const navigateTo = (uuid: string) =>
async (dispatch: Dispatch, getState: () => RootState) => {
const kind = extractUuidKind(uuid);
- if (kind === ResourceKind.PROJECT || kind === ResourceKind.USER || kind === ResourceKind.COLLECTION || kind === ResourceKind.CONTAINER_REQUEST) {
- dispatch<any>(pushOrGoto(getNavUrl(uuid, getState().auth)));
- } else if (kind === ResourceKind.VIRTUAL_MACHINE) {
- dispatch<any>(navigateToAdminVirtualMachines);
+
+ switch (kind) {
+ case ResourceKind.PROJECT:
+ case ResourceKind.USER:
+ case ResourceKind.COLLECTION:
+ case ResourceKind.CONTAINER_REQUEST:
+ dispatch<any>(pushOrGoto(getNavUrl(uuid, getState().auth)));
+ return;
+ case ResourceKind.VIRTUAL_MACHINE:
+ dispatch<any>(navigateToAdminVirtualMachines);
+ return;
}
- if (uuid === SidePanelTreeCategory.FAVORITES) {
- dispatch<any>(navigateToFavorites);
- } else if (uuid === SidePanelTreeCategory.PUBLIC_FAVORITES) {
- dispatch(navigateToPublicFavorites);
- } else if (uuid === SidePanelTreeCategory.SHARED_WITH_ME) {
- dispatch(navigateToSharedWithMe);
- } else if (uuid === SidePanelTreeCategory.WORKFLOWS) {
- dispatch(navigateToWorkflows);
- } else if (uuid === SidePanelTreeCategory.TRASH) {
- dispatch(navigateToTrash);
- } else if (uuid === GROUPS_PANEL_LABEL) {
- dispatch(navigateToGroups);
+
+ switch (uuid) {
+ case SidePanelTreeCategory.FAVORITES:
+ dispatch<any>(navigateToFavorites);
+ return;
+ case SidePanelTreeCategory.PUBLIC_FAVORITES:
+ dispatch(navigateToPublicFavorites);
+ return;
+ case SidePanelTreeCategory.SHARED_WITH_ME:
+ dispatch(navigateToSharedWithMe);
+ return;
+ case SidePanelTreeCategory.WORKFLOWS:
+ dispatch(navigateToWorkflows);
+ return;
+ case SidePanelTreeCategory.TRASH:
+ dispatch(navigateToTrash);
+ return;
+ case GROUPS_PANEL_LABEL:
+ dispatch(navigateToGroups);
+ return;
+ case SidePanelTreeCategory.ALL_PROCESSES:
+ dispatch(navigateToAllProcesses);
+ return;
}
};
export const navigateToLinks = push(Routes.LINKS);
export const navigateToCollectionsContentAddress = push(Routes.COLLECTIONS_CONTENT_ADDRESS);
+
+export const navigateToAllProcesses = push(Routes.ALL_PROCESSES);
PUBLIC_FAVORITES = 'Public Favorites',
WORKFLOWS = 'Workflows',
FAVORITES = 'Favorites',
- TRASH = 'Trash'
+ TRASH = 'Trash',
+ ALL_PROCESSES = 'All Processes'
}
export const SIDE_PANEL_TREE = 'sidePanelTree';
};
const SIDE_PANEL_CATEGORIES = [
+ SidePanelTreeCategory.ALL_PROCESSES,
SidePanelTreeCategory.PUBLIC_FAVORITES,
SidePanelTreeCategory.WORKFLOWS,
SidePanelTreeCategory.FAVORITES,
import { Dispatch } from 'redux';
import { isSidePanelTreeCategory, SidePanelTreeCategory } from '~/store/side-panel-tree/side-panel-tree-actions';
-import { navigateToFavorites, navigateTo, navigateToTrash, navigateToSharedWithMe, navigateToWorkflows, navigateToPublicFavorites } from '~/store/navigation/navigation-action';
+import { navigateToFavorites, navigateTo, navigateToTrash, navigateToSharedWithMe, navigateToWorkflows, navigateToPublicFavorites, navigateToAllProcesses } from '~/store/navigation/navigation-action';
import {snackbarActions, SnackbarKind} from '~/store/snackbar/snackbar-actions';
export const navigateFromSidePanel = (id: string) =>
return navigateToSharedWithMe;
case SidePanelTreeCategory.WORKFLOWS:
return navigateToWorkflows;
+ case SidePanelTreeCategory.ALL_PROCESSES:
+ return navigateToAllProcesses;
default:
return sidePanelTreeCategoryNotAvailable(id);
}
import { TreeItem } from "~/components/tree/tree";
import { ProjectResource } from "~/models/project";
import { ListItemTextIcon } from "~/components/list-item-text-icon/list-item-text-icon";
-import { ProjectIcon, FavoriteIcon, ProjectsIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon } from '~/components/icon/icon';
+import { ProcessIcon, ProjectIcon, FavoriteIcon, ProjectsIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon } from '~/components/icon/icon';
import { WorkflowIcon } from '~/components/icon/icon';
import { activateSidePanelTreeItem, toggleSidePanelTreeItemCollapse, SIDE_PANEL_TREE, SidePanelTreeCategory } from '~/store/side-panel-tree/side-panel-tree-actions';
import { openSidePanelContextMenu } from '~/store/context-menu/context-menu-actions';
return WorkflowIcon;
case SidePanelTreeCategory.PUBLIC_FAVORITES:
return PublicFavoriteIcon;
+ case SidePanelTreeCategory.ALL_PROCESSES:
+ return ProcessIcon;
default:
return ProjectIcon;
}