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