cefef345f0a0df2b842a764a0ae37ce0b1a5d25e
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / trashed-collection-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 { DetailsIcon, ProvenanceGraphIcon, AdvancedIcon, RestoreFromTrashIcon } from '~/components/icon/icon';
7 import { toggleCollectionTrashed } from "~/store/trash/trash-actions";
8 import { detailsPanelActions } from "~/store/details-panel/details-panel-action";
9 import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
10 import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action';
11
12 export const trashedCollectionActionSet: ContextMenuActionSet = [[
13     {
14         icon: DetailsIcon,
15         name: "View details",
16         execute: dispatch => {
17             dispatch<any>(toggleDetailsPanel());
18         }
19     },
20     {
21         icon: ProvenanceGraphIcon,
22         name: "Provenance graph",
23         execute: (dispatch, resource) => {
24             // add code
25         }
26     },
27     {
28         icon: AdvancedIcon,
29         name: "Advanced",
30         execute: (dispatch, resource) => {
31             dispatch<any>(openAdvancedTabDialog(resource.uuid));
32         }
33     },
34     {
35         icon: RestoreFromTrashIcon,
36         name: "Restore",
37         execute: (dispatch, resource) => {
38             dispatch<any>(toggleCollectionTrashed(resource.uuid, true));
39         }
40     },
41 ]];