20252: Clean up imports
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / workflow-action-set.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
6 import { openRunProcess } from "store/workflow-panel/workflow-panel-actions";
7 import {
8     DetailsIcon,
9     AdvancedIcon,
10     OpenIcon,
11     Link,
12     StartIcon
13 } from "components/icon/icon";
14 import { copyToClipboardAction, openInNewTabAction } from "store/open-in-new-tab/open-in-new-tab.actions";
15 import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
16 import { openAdvancedTabDialog } from "store/advanced-tab/advanced-tab";
17
18 export const workflowActionSet: ContextMenuActionSet = [[
19     {
20         icon: OpenIcon,
21         name: "Open in new tab",
22         execute: (dispatch, resource) => {
23             dispatch<any>(openInNewTabAction(resource));
24         }
25     },
26     {
27         icon: Link,
28         name: "Copy to clipboard",
29         execute: (dispatch, resource) => {
30             dispatch<any>(copyToClipboardAction(resource));
31         }
32     },
33     {
34         icon: DetailsIcon,
35         name: "View details",
36         execute: dispatch => {
37             dispatch<any>(toggleDetailsPanel());
38         }
39     },
40     {
41         icon: AdvancedIcon,
42         name: "API Details",
43         execute: (dispatch, resource) => {
44             dispatch<any>(openAdvancedTabDialog(resource.uuid));
45         }
46     },
47     {
48         icon: StartIcon,
49         name: "Run Workflow",
50         execute: (dispatch, resource) => {
51             dispatch<any>(openRunProcess(resource.uuid, resource.ownerUuid, resource.name));
52         }
53     },
54 ]];