Merge branch '13858-process-view-information-card' into 13860-status-for-subprocesses
[arvados.git] / src / views-components / context-menu / action-sets / process-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 "../context-menu-action-set";
6 import { ToggleFavoriteAction } from "../actions/favorite-action";
7 import { toggleFavorite } from "~/store/favorites/favorites-actions";
8 import {
9     RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, ProvenanceGraphIcon,
10     AdvancedIcon, RemoveIcon, ReRunProcessIcon, LogIcon
11 } from "~/components/icon/icon";
12 import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
13
14 export const processActionSet: ContextMenuActionSet = [[
15     {
16         icon: RenameIcon,
17         name: "Edit process",
18         execute: (dispatch, resource) => {
19             // add code
20         }
21     },
22     {
23         icon: ShareIcon,
24         name: "Share",
25         execute: (dispatch, resource) => {
26             // add code
27         }
28     },
29     {
30         icon: MoveToIcon,
31         name: "Move to",
32         execute: (dispatch, resource) => {
33             // add code
34         }
35     },
36     {
37         component: ToggleFavoriteAction,
38         execute: (dispatch, resource) => {
39             dispatch<any>(toggleFavorite(resource)).then(() => {
40                 dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
41             });
42         }
43     },
44     {
45         icon: CopyIcon,
46         name: "Copy to project",
47         execute: (dispatch, resource) => {
48             // add code
49         }
50     },
51     {
52         icon: ReRunProcessIcon,
53         name: "Re-run process",
54         execute: (dispatch, resource) => {
55             // add code
56         }
57     },
58     {
59         name: "Inputs",
60         execute: (dispatch, resource) => {
61             // add code
62         }
63     },
64     {
65         name: "Outputs",
66         execute: (dispatch, resource) => {
67             // add code
68         }
69     },
70     {
71         name: "Command",
72         execute: (dispatch, resource) => {
73             // add code
74         }
75     },
76     {
77         icon: DetailsIcon,
78         name: "View details",
79         execute: (dispatch, resource) => {
80             // add code
81         }
82     },
83     {
84         icon: LogIcon,
85         name: "Log",
86         execute: (dispatch, resource) => {
87             // add code
88         }
89     },
90     {
91         icon: ProvenanceGraphIcon,
92         name: "Provenance graph",
93         execute: (dispatch, resource) => {
94             // add code
95         }
96     },
97     {
98         icon: AdvancedIcon,
99         name: "Advanced",
100         execute: (dispatch, resource) => {
101             // add code
102         }
103     },
104     {
105         icon: RemoveIcon,
106         name: "Remove",
107         execute: (dispatch, resource) => {
108             // add code
109         }
110     }
111 ]];