1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set";
6 import { ToggleFavoriteAction } from "~/views-components/context-menu/actions/favorite-action";
7 import { toggleFavorite } from "~/store/favorites/favorites-actions";
9 RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, ProvenanceGraphIcon,
10 AdvancedIcon, RemoveIcon, ReRunProcessIcon, LogIcon, InputIcon, CommandIcon, OutputIcon
11 } from "~/components/icon/icon";
12 import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
13 import { navigateToProcessLogs } from '~/store/navigation/navigation-action';
14 import { openMoveProcessDialog } from '~/store/processes/process-move-actions';
15 import { openProcessUpdateDialog } from "~/store/processes/process-update-actions";
16 import { openCopyProcessDialog } from '~/store/processes/process-copy-actions';
17 import { openProcessCommandDialog } from '~/store/processes/process-command-actions';
18 import { openSharingDialog } from "~/store/sharing-dialog/sharing-dialog-actions";
19 import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
20 import { openProcessInputDialog } from "~/store/processes/process-input-actions";
21 import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action';
22 import { openRemoveProcessDialog } from "~/store/processes/processes-actions";
23 import { navigateToOutput } from "~/store/process-panel/process-panel-actions";
25 export const processActionSet: ContextMenuActionSet = [[
29 execute: (dispatch, resource) => {
30 dispatch<any>(openProcessUpdateDialog(resource));
36 execute: (dispatch, { uuid }) => {
37 dispatch<any>(openSharingDialog(uuid));
41 component: ToggleFavoriteAction,
42 execute: (dispatch, resource) => {
43 dispatch<any>(toggleFavorite(resource)).then(() => {
44 dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
51 execute: (dispatch, resource) => {
52 dispatch<any>(openMoveProcessDialog(resource));
57 name: "Copy to project",
58 execute: (dispatch, resource) => {
59 dispatch<any>(openCopyProcessDialog(resource));
63 icon: ReRunProcessIcon,
64 name: "Re-run process",
65 execute: (dispatch, resource) => {
72 execute: (dispatch, resource) => {
73 dispatch<any>(openProcessInputDialog(resource.uuid));
79 execute: (dispatch, resource) => {
80 if(resource.outputUuid){
81 dispatch<any>(navigateToOutput(resource.outputUuid));
88 execute: (dispatch, resource) => {
89 dispatch<any>(openProcessCommandDialog(resource.uuid));
95 execute: (dispatch, resource) => {
96 dispatch<any>(navigateToProcessLogs(resource.uuid));
101 name: "View details",
102 execute: dispatch => {
103 dispatch<any>(toggleDetailsPanel());
107 // icon: ProvenanceGraphIcon,
108 // name: "Provenance graph",
109 // execute: (dispatch, resource) => {
116 execute: (dispatch, resource) => {
117 dispatch<any>(openAdvancedTabDialog(resource.uuid));
123 execute: (dispatch, resource) => {
124 dispatch<any>(openRemoveProcessDialog(resource.uuid));