Merge remote-tracking branch 'origin/main' into 19051-handle-quotes-in-search
[arvados-workbench2.git] / src / store / navigation / navigation-action.ts
index 1cdb6784bf42390c88ef60fa920a76c773ab71c8..146530cae8e3ffaf530da19ca3be07743026c78f 100644 (file)
@@ -8,12 +8,13 @@ import { ResourceKind, extractUuidKind } from 'models/resource';
 import { SidePanelTreeCategory } from '../side-panel-tree/side-panel-tree-actions';
 import { Routes, getGroupUrl, getNavUrl, getUserProfileUrl } from 'routes/routes';
 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 { 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,
@@ -40,6 +41,9 @@ export const navigateTo = (uuid: string) =>
             case ResourceKind.VIRTUAL_MACHINE:
                 dispatch<any>(navigateToAdminVirtualMachines);
                 return;
+            case ResourceKind.WORKFLOW:
+                dispatch<any>(openDetailsPanel(uuid));
+                return;
         }
 
         switch (uuid) {
@@ -58,9 +62,6 @@ export const navigateTo = (uuid: string) =>
             case SidePanelTreeCategory.SHARED_WITH_ME:
                 dispatch(navigateToSharedWithMe);
                 return;
-            case SidePanelTreeCategory.WORKFLOWS:
-                dispatch(navigateToWorkflows);
-                return;
             case SidePanelTreeCategory.TRASH:
                 dispatch(navigateToTrash);
                 return;