1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { openRunProcess, deleteWorkflow } from 'store/workflow-panel/workflow-panel-actions';
6 import { StartIcon, TrashIcon, Link } from 'components/icon/icon';
7 import { MultiSelectMenuAction, MultiSelectMenuActionSet, msCommonActionSet } from './ms-menu-actions';
8 import { MultiSelectMenuActionNames } from "views-components/multiselect-toolbar/ms-menu-actions";
9 import { copyToClipboardAction } from 'store/open-in-new-tab/open-in-new-tab.actions';
11 const { OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, VIEW_DETAILS, API_DETAILS, RUN_WORKFLOW, DELETE_WORKFLOW } = MultiSelectMenuActionNames;
13 const msRunWorkflow: MultiSelectMenuAction = {
18 execute: (dispatch, resources) => {
19 dispatch<any>(openRunProcess(resources[0].uuid, resources[0].ownerUuid, resources[0].name));
23 const msDeleteWorkflow: MultiSelectMenuAction = {
24 name: DELETE_WORKFLOW,
28 execute: (dispatch, resources) => {
29 dispatch<any>(deleteWorkflow(resources[0].uuid, resources[0].ownerUuid));
33 const msCopyToClipboardMenuAction: MultiSelectMenuAction = {
34 name: COPY_TO_CLIPBOARD,
38 execute: (dispatch, resources) => {
39 dispatch<any>(copyToClipboardAction(resources));
43 export const msWorkflowActionSet: MultiSelectMenuActionSet = [[...msCommonActionSet, msRunWorkflow, msDeleteWorkflow, msCopyToClipboardMenuAction]];
45 export const msReadOnlyWorkflowActionFilter = new Set([OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, VIEW_DETAILS, API_DETAILS, RUN_WORKFLOW ]);
46 export const msWorkflowActionFilter = new Set([OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, VIEW_DETAILS, API_DETAILS, RUN_WORKFLOW, DELETE_WORKFLOW]);