1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { ContextMenuActionSet, ContextMenuActionNames } from "views-components/context-menu/context-menu-action-set";
6 import { openRunProcess, openRemoveWorkflowDialog } from "store/workflow-panel/workflow-panel-actions";
7 import { DetailsIcon, AdvancedIcon, OpenIcon, Link, StartIcon, DeleteForever } from "components/icon/icon";
8 import { copyToClipboardAction, openInNewTabAction } from "store/open-in-new-tab/open-in-new-tab.actions";
9 import { openDetailsPanel } from "store/details-panel/details-panel-action";
10 import { openAdvancedTabDialog } from "store/advanced-tab/advanced-tab";
12 export const readOnlyWorkflowActionSet: ContextMenuActionSet = [
16 name: ContextMenuActionNames.OPEN_IN_NEW_TAB,
17 execute: (dispatch, resources) => {
18 dispatch<any>(openInNewTabAction(resources[0]));
23 name: ContextMenuActionNames.COPY_LINK_TO_CLIPBOARD,
24 execute: (dispatch, resources) => {
25 dispatch<any>(copyToClipboardAction(resources));
30 name: ContextMenuActionNames.VIEW_DETAILS,
31 execute: (dispatch, resources) => {
32 dispatch<any>(openDetailsPanel(resources[0].uuid));
37 name: ContextMenuActionNames.API_DETAILS,
38 execute: (dispatch, resources) => {
39 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
44 name: ContextMenuActionNames.RUN_WORKFLOW,
45 execute: (dispatch, resources) => {
46 dispatch<any>(openRunProcess(resources[0].uuid, resources[0].ownerUuid, resources[0].name));
52 export const workflowActionSet: ContextMenuActionSet = [
54 ...readOnlyWorkflowActionSet[0],
57 name: "Delete Workflow",
58 execute: (dispatch, resources) => {
59 dispatch<any>(openRemoveWorkflowDialog(resources[0], resources.length));