[arvados-workbench2] updated: 2.7.0-218-g34f3d66c

git repository hosting git at public.arvados.org
Mon Nov 27 16:17:03 UTC 2023


Summary of changes:
 .../multiselect-toolbar/MultiselectToolbar.tsx     |  2 +-
 .../ms-kind-action-differentiator.ts               |  8 ++-
 .../ms-toolbar-action-filters.ts                   | 18 +++--
 .../ms-collection-action-set.ts                    |  2 +-
 .../{ms-menu-action-set.ts => ms-menu-actions.ts}  |  2 +
 .../multiselect-toolbar/ms-process-action-set.ts   |  2 +-
 .../multiselect-toolbar/ms-project-action-set.ts   |  2 +-
 .../multiselect-toolbar/ms-workflow-action-set.ts  | 76 ++++++++++++++++++++++
 8 files changed, 99 insertions(+), 13 deletions(-)
 rename src/views-components/multiselect-toolbar/{ms-menu-action-set.ts => ms-menu-actions.ts} (95%)
 create mode 100644 src/views-components/multiselect-toolbar/ms-workflow-action-set.ts

       via  34f3d66c75012eacc5e2ee5124168fab73dbb238 (commit)
      from  db3226751d671bf449b5b31155a26c7eb3b04bcb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 34f3d66c75012eacc5e2ee5124168fab73dbb238
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon Nov 27 11:16:58 2023 -0500

    21128: added workflow actions Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/src/components/multiselect-toolbar/MultiselectToolbar.tsx b/src/components/multiselect-toolbar/MultiselectToolbar.tsx
index 72d375ff..dbc5e59e 100644
--- a/src/components/multiselect-toolbar/MultiselectToolbar.tsx
+++ b/src/components/multiselect-toolbar/MultiselectToolbar.tsx
@@ -13,7 +13,7 @@ import { ContextMenuResource } from "store/context-menu/context-menu-actions";
 import { Resource, extractUuidKind } from "models/resource";
 import { getResource } from "store/resources/resources";
 import { ResourcesState } from "store/resources/resources";
-import { MultiSelectMenuAction, MultiSelectMenuActionSet, MultiSelectMenuActionNames } from "views-components/multiselect-toolbar/ms-menu-action-set";
+import { MultiSelectMenuAction, MultiSelectMenuActionSet, MultiSelectMenuActionNames } from "views-components/multiselect-toolbar/ms-menu-actions";
 import { ContextMenuAction } from "views-components/context-menu/context-menu-action-set";
 import { multiselectActionsFilters, TMultiselectActionsFilters } from "./ms-toolbar-action-filters";
 import { kindToActionSet, findActionByName } from "./ms-kind-action-differentiator";
diff --git a/src/components/multiselect-toolbar/ms-kind-action-differentiator.ts b/src/components/multiselect-toolbar/ms-kind-action-differentiator.ts
index 74593ac7..5a84d4c5 100644
--- a/src/components/multiselect-toolbar/ms-kind-action-differentiator.ts
+++ b/src/components/multiselect-toolbar/ms-kind-action-differentiator.ts
@@ -3,19 +3,21 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { ResourceKind } from "models/resource";
-import { MultiSelectMenuActionSet} from "views-components/multiselect-toolbar/ms-menu-action-set";
+import { MultiSelectMenuActionSet} from "views-components/multiselect-toolbar/ms-menu-actions";
 import { msCollectionActionSet } from "views-components/multiselect-toolbar/ms-collection-action-set";
 import { msProjectActionSet } from "views-components/multiselect-toolbar/ms-project-action-set";
 import { msProcessActionSet } from "views-components/multiselect-toolbar/ms-process-action-set";
+import { msWorkflowActionSet } from "views-components/multiselect-toolbar/ms-workflow-action-set";
 
 export function findActionByName(name: string, actionSet: MultiSelectMenuActionSet) {
     return actionSet[0].find(action => action.name === name);
 }
 
-const { COLLECTION, PROJECT, PROCESS } = ResourceKind;
+const { COLLECTION, PROCESS, PROJECT, WORKFLOW } = ResourceKind;
 
 export const kindToActionSet: Record<string, MultiSelectMenuActionSet> = {
     [COLLECTION]: msCollectionActionSet,
-    [PROJECT]: msProjectActionSet,
     [PROCESS]: msProcessActionSet,
+    [PROJECT]: msProjectActionSet,
+    [WORKFLOW]: msWorkflowActionSet,
 };
diff --git a/src/components/multiselect-toolbar/ms-toolbar-action-filters.ts b/src/components/multiselect-toolbar/ms-toolbar-action-filters.ts
index 12910e43..f921cd1f 100644
--- a/src/components/multiselect-toolbar/ms-toolbar-action-filters.ts
+++ b/src/components/multiselect-toolbar/ms-toolbar-action-filters.ts
@@ -3,10 +3,11 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { ResourceKind } from 'models/resource';
-import { MultiSelectMenuActionSet, MultiSelectMenuActionNames } from 'views-components/multiselect-toolbar/ms-menu-action-set';
+import { MultiSelectMenuActionSet, MultiSelectMenuActionNames } from 'views-components/multiselect-toolbar/ms-menu-actions';
 import { msCollectionActionSet } from 'views-components/multiselect-toolbar/ms-collection-action-set';
 import { msProjectActionSet } from 'views-components/multiselect-toolbar/ms-project-action-set';
 import { msProcessActionSet } from 'views-components/multiselect-toolbar/ms-process-action-set';
+import { msWorkflowActionSet } from 'views-components/multiselect-toolbar/ms-workflow-action-set';
 
 export type TMultiselectActionsFilters = Record<string, [MultiSelectMenuActionSet, Set<string>]>;
 
@@ -16,6 +17,7 @@ const {
     API_DETAILS,
     COPY_AND_RERUN_PROCESS,
     COPY_TO_CLIPBOARD,
+    DELETE_WORKFLOW,
     EDIT_PPROJECT,
     FREEZE_PROJECT,
     MAKE_A_COPY,
@@ -24,11 +26,14 @@ const {
     OPEN_IN_NEW_TAB,
     OPEN_W_3RD_PARTY_CLIENT,
     REMOVE,
+    RUN_WORKFLOW,
     SHARE,
     VIEW_DETAILS,
 } = MultiSelectMenuActionNames;
 
 //these sets govern what actions are on the ms toolbar for each resource kind
+const collectionMSActionsFilter = new Set([MAKE_A_COPY, MOVE_TO, ADD_TO_TRASH]);
+const processResourceMSActionsFilter = new Set([MOVE_TO, REMOVE]);
 const projectMSActionsFilter = new Set([
     ADD_TO_FAVORITES,
     ADD_TO_TRASH,
@@ -46,13 +51,14 @@ const projectMSActionsFilter = new Set([
     SHARE,
     VIEW_DETAILS,
 ]);
-const processResourceMSActionsFilter = new Set([MOVE_TO, REMOVE]);
-const collectionMSActionsFilter = new Set([MAKE_A_COPY, MOVE_TO, ADD_TO_TRASH]);
+const workflowMSActionFilter = new Set([OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, VIEW_DETAILS, API_DETAILS, RUN_WORKFLOW, DELETE_WORKFLOW]);
 
-const { COLLECTION, PROJECT, PROCESS } = ResourceKind;
+const { COLLECTION, PROCESS, PROJECT, WORKFLOW } = ResourceKind;
 
 export const multiselectActionsFilters: TMultiselectActionsFilters = {
-    [PROJECT]: [msProjectActionSet, projectMSActionsFilter],
-    [PROCESS]: [msProcessActionSet, processResourceMSActionsFilter],
     [COLLECTION]: [msCollectionActionSet, collectionMSActionsFilter],
+    [PROCESS]: [msProcessActionSet, processResourceMSActionsFilter],
+    [PROJECT]: [msProjectActionSet, projectMSActionsFilter],
+    [WORKFLOW]: [msWorkflowActionSet, workflowMSActionFilter]
 };
+
diff --git a/src/views-components/multiselect-toolbar/ms-collection-action-set.ts b/src/views-components/multiselect-toolbar/ms-collection-action-set.ts
index 641645e0..3afe1556 100644
--- a/src/views-components/multiselect-toolbar/ms-collection-action-set.ts
+++ b/src/views-components/multiselect-toolbar/ms-collection-action-set.ts
@@ -7,7 +7,7 @@ import { openMoveCollectionDialog } from "store/collections/collection-move-acti
 import { openCollectionCopyDialog, openMultiCollectionCopyDialog } from "store/collections/collection-copy-actions";
 import { toggleCollectionTrashed } from "store/trash/trash-actions";
 import { ContextMenuResource } from "store/context-menu/context-menu-actions";
-import { MultiSelectMenuActionSet, MultiSelectMenuActionNames } from "./ms-menu-action-set";
+import { MultiSelectMenuActionSet, MultiSelectMenuActionNames } from "./ms-menu-actions";
 import { TrashIcon } from "components/icon/icon";
 
 export const msCollectionActionSet: MultiSelectMenuActionSet = [
diff --git a/src/views-components/multiselect-toolbar/ms-menu-action-set.ts b/src/views-components/multiselect-toolbar/ms-menu-actions.ts
similarity index 95%
rename from src/views-components/multiselect-toolbar/ms-menu-action-set.ts
rename to src/views-components/multiselect-toolbar/ms-menu-actions.ts
index fa4f9283..7f3bb475 100644
--- a/src/views-components/multiselect-toolbar/ms-menu-action-set.ts
+++ b/src/views-components/multiselect-toolbar/ms-menu-actions.ts
@@ -14,6 +14,7 @@ export const MultiSelectMenuActionNames = {
   API_DETAILS: 'API Details',
   COPY_AND_RERUN_PROCESS: "Copy and re-run process",
   COPY_TO_CLIPBOARD: "Copy to clipboard",
+  DELETE_WORKFLOW: 'DELETE_WORKFLOW', 
   EDIT_PPROJECT: 'Edit project',
   FREEZE_PROJECT: 'Freeze Project',
   MAKE_A_COPY: "Make a copy",
@@ -22,6 +23,7 @@ export const MultiSelectMenuActionNames = {
   OPEN_IN_NEW_TAB: 'Open in new tab',
   OPEN_W_3RD_PARTY_CLIENT: 'Open with 3rd party client',
   REMOVE: "Remove",
+  RUN_WORKFLOW: 'RUN_WORKFLOW',
   SHARE: 'Share',
   VIEW_DETAILS: 'View details',
 };
diff --git a/src/views-components/multiselect-toolbar/ms-process-action-set.ts b/src/views-components/multiselect-toolbar/ms-process-action-set.ts
index be6d9f98..de906244 100644
--- a/src/views-components/multiselect-toolbar/ms-process-action-set.ts
+++ b/src/views-components/multiselect-toolbar/ms-process-action-set.ts
@@ -6,7 +6,7 @@ import { MoveToIcon, RemoveIcon, ReRunProcessIcon } from "components/icon/icon";
 import { openMoveProcessDialog } from "store/processes/process-move-actions";
 import { openCopyProcessDialog } from "store/processes/process-copy-actions";
 import { openRemoveProcessDialog } from "store/processes/processes-actions";
-import { MultiSelectMenuActionSet, MultiSelectMenuActionNames } from "./ms-menu-action-set";
+import { MultiSelectMenuActionSet, MultiSelectMenuActionNames } from "./ms-menu-actions";
 
 export const msProcessActionSet: MultiSelectMenuActionSet = [
     [
diff --git a/src/views-components/multiselect-toolbar/ms-project-action-set.ts b/src/views-components/multiselect-toolbar/ms-project-action-set.ts
index b61cded5..115c4ce9 100644
--- a/src/views-components/multiselect-toolbar/ms-project-action-set.ts
+++ b/src/views-components/multiselect-toolbar/ms-project-action-set.ts
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { MultiSelectMenuAction, MultiSelectMenuActionNames } from 'views-components/multiselect-toolbar/ms-menu-action-set';
+import { MultiSelectMenuAction, MultiSelectMenuActionNames } from 'views-components/multiselect-toolbar/ms-menu-actions';
 import { openMoveProjectDialog } from 'store/projects/project-move-actions';
 import { toggleProjectTrashed } from 'store/trash/trash-actions';
 import { copyToClipboardAction, openInNewTabAction } from 'store/open-in-new-tab/open-in-new-tab.actions';
diff --git a/src/views-components/multiselect-toolbar/ms-workflow-action-set.ts b/src/views-components/multiselect-toolbar/ms-workflow-action-set.ts
new file mode 100644
index 00000000..00210aad
--- /dev/null
+++ b/src/views-components/multiselect-toolbar/ms-workflow-action-set.ts
@@ -0,0 +1,76 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { openRunProcess, deleteWorkflow } from 'store/workflow-panel/workflow-panel-actions';
+import { DetailsIcon, AdvancedIcon, OpenIcon, Link, StartIcon, TrashIcon } from 'components/icon/icon';
+import { copyToClipboardAction, openInNewTabAction } from 'store/open-in-new-tab/open-in-new-tab.actions';
+import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
+import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
+import { MultiSelectMenuActionSet, MultiSelectMenuActionNames } from './ms-menu-actions';
+
+export const msReadOnlyWorkflowActionSet: MultiSelectMenuActionSet = [
+    [
+        {
+            name: MultiSelectMenuActionNames.OPEN_IN_NEW_TAB,
+            icon: OpenIcon,
+            hasAlts: false,
+            isForMulti: false,
+            execute: (dispatch, resources) => {
+                dispatch<any>(openInNewTabAction(resources[0]));
+            },
+        },
+        {
+            name: MultiSelectMenuActionNames.COPY_TO_CLIPBOARD,
+            icon: Link,
+
+            hasAlts: false,
+            isForMulti: false,
+            execute: (dispatch, resources) => {
+                dispatch<any>(copyToClipboardAction(resources));
+            },
+        },
+        {
+            name: MultiSelectMenuActionNames.VIEW_DETAILS,
+            icon: DetailsIcon,
+            hasAlts: false,
+            isForMulti: false,
+            execute: (dispatch) => {
+                dispatch<any>(toggleDetailsPanel());
+            },
+        },
+        {
+            name: MultiSelectMenuActionNames.API_DETAILS,
+            icon: AdvancedIcon,
+            hasAlts: false,
+            isForMulti: false,
+            execute: (dispatch, resources) => {
+                dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
+            },
+        },
+        {
+            name: MultiSelectMenuActionNames.RUN_WORKFLOW,
+            icon: StartIcon,
+            hasAlts: false,
+            isForMulti: false,
+            execute: (dispatch, resources) => {
+                dispatch<any>(openRunProcess(resources[0].uuid, resources[0].ownerUuid, resources[0].name));
+            },
+        },
+    ],
+];
+
+export const msWorkflowActionSet: MultiSelectMenuActionSet = [
+    [
+        ...msReadOnlyWorkflowActionSet[0],
+        {
+            name: MultiSelectMenuActionNames.DELETE_WORKFLOW,
+            icon: TrashIcon,
+            hasAlts: false,
+            isForMulti: false,
+            execute: (dispatch, resources) => {
+                dispatch<any>(deleteWorkflow(resources[0].uuid, resources[0].ownerUuid));
+            },
+        },
+    ],
+];

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list