1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { ContextMenuActionSet, ContextMenuActionNames } 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 { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
9 import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
11 export const trashedCollectionActionSet: ContextMenuActionSet = [
15 name: ContextMenuActionNames.VIEW_DETAILS,
16 execute: (dispatch) => {
17 dispatch<any>(toggleDetailsPanel());
21 icon: ProvenanceGraphIcon,
22 name: ContextMenuActionNames.PROVENANCE_GRAPH,
23 execute: (dispatch, resource) => {
29 name: ContextMenuActionNames.API_DETAILS,
30 execute: (dispatch, resources) => {
31 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
35 icon: RestoreFromTrashIcon,
36 name: ContextMenuActionNames.RESTORE,
37 execute: (dispatch, resources) => {
38 resources.forEach((resource) => dispatch<any>(toggleCollectionTrashed(resource.uuid, true)));