19482: Fix context menu, breadcrumbs
[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     RenameIcon,
9     ShareIcon,
10     MoveToIcon,
11     CopyIcon,
12     DetailsIcon,
13     AdvancedIcon,
14     OpenIcon,
15     Link,
16     RestoreVersionIcon,
17     FolderSharedIcon,
18     StartIcon
19 } from "components/icon/icon";
20 import { copyToClipboardAction, openInNewTabAction } from "store/open-in-new-tab/open-in-new-tab.actions";
21 import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
22 import { openAdvancedTabDialog } from "store/advanced-tab/advanced-tab";
23
24 export const workflowActionSet: ContextMenuActionSet = [[
25     {
26         icon: OpenIcon,
27         name: "Open in new tab",
28         execute: (dispatch, resource) => {
29             dispatch<any>(openInNewTabAction(resource));
30         }
31     },
32     {
33         icon: Link,
34         name: "Copy to clipboard",
35         execute: (dispatch, resource) => {
36             dispatch<any>(copyToClipboardAction(resource));
37         }
38     },
39     {
40         icon: DetailsIcon,
41         name: "View details",
42         execute: dispatch => {
43             dispatch<any>(toggleDetailsPanel());
44         }
45     },
46     {
47         icon: AdvancedIcon,
48         name: "API Details",
49         execute: (dispatch, resource) => {
50             dispatch<any>(openAdvancedTabDialog(resource.uuid));
51         }
52     },
53     {
54         icon: StartIcon,
55         name: "Run Workflow",
56         execute: (dispatch, resource) => {
57             dispatch<any>(openRunProcess(resource.uuid, resource.ownerUuid, resource.name));
58         }
59     },
60 ]];