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 { detailsPanelActions } from '~/store/details-panel/details-panel-action';
19 import { openSharingDialog } from "~/store/sharing-dialog/sharing-dialog-actions";
20 import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
21 import { openProcessInputDialog } from "~/store/processes/process-input-actions";
22 import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action';
24 export const processActionSet: ContextMenuActionSet = [[
28 execute: (dispatch, resource) => {
29 dispatch<any>(openProcessUpdateDialog(resource));
35 execute: (dispatch, { uuid }) => {
36 dispatch<any>(openSharingDialog(uuid));
40 component: ToggleFavoriteAction,
41 execute: (dispatch, resource) => {
42 dispatch<any>(toggleFavorite(resource)).then(() => {
43 dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
50 execute: (dispatch, resource) => {
51 dispatch<any>(openMoveProcessDialog(resource));
56 name: "Copy to project",
57 execute: (dispatch, resource) => {
58 dispatch<any>(openCopyProcessDialog(resource));
62 icon: ReRunProcessIcon,
63 name: "Re-run process",
64 execute: (dispatch, resource) => {
71 execute: (dispatch, resource) => {
72 dispatch<any>(openProcessInputDialog(resource.uuid));
78 execute: (dispatch, resource) => {
85 execute: (dispatch, resource) => {
86 dispatch<any>(openProcessCommandDialog(resource.uuid));
92 execute: (dispatch, resource) => {
93 dispatch<any>(navigateToProcessLogs(resource.uuid));
99 execute: dispatch => {
100 dispatch<any>(toggleDetailsPanel());
104 // icon: ProvenanceGraphIcon,
105 // name: "Provenance graph",
106 // execute: (dispatch, resource) => {
113 execute: (dispatch, resource) => {
114 dispatch<any>(openAdvancedTabDialog(resource.uuid));
120 // execute: (dispatch, resource) => {