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, AdvancedIcon, OpenIcon, Link } from 'components/icon/icon';
7 import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
8 import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
9 import { copyToClipboardAction, openInNewTabAction } from 'store/open-in-new-tab/open-in-new-tab.actions';
11 export const searchResultsActionSet: ContextMenuActionSet = [
15 name: ContextMenuActionNames.OPEN_IN_NEW_TAB,
16 execute: (dispatch, resources) => {
17 resources.forEach((resource) => dispatch<any>(openInNewTabAction(resource)));
22 name: ContextMenuActionNames.COPY_LINK_TO_CLIPBOARD,
23 execute: (dispatch, resources) => {
24 dispatch<any>(copyToClipboardAction(resources));
29 name: ContextMenuActionNames.VIEW_DETAILS,
30 execute: (dispatch) => {
31 dispatch<any>(toggleDetailsPanel());
36 name: ContextMenuActionNames.API_DETAILS,
37 execute: (dispatch, resources) => {
38 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));