1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { ContextMenuActionNames } from 'views-components/context-menu/context-menu-action-set';
6 import { RenameIcon, AdvancedIcon, RemoveIcon, DetailsIcon } from 'components/icon/icon';
7 import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
8 import { openRemoveGroupDialog, openGroupUpdateDialog } from 'store/groups-panel/groups-panel-actions';
9 import { MultiSelectMenuAction, MultiSelectMenuActionSet } from 'views-components/multiselect-toolbar/ms-menu-actions';
10 import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
12 const msRenameGroupAction: MultiSelectMenuAction = {
13 name: ContextMenuActionNames.RENAME,
17 execute: (dispatch, resources) => {
18 dispatch<any>(openGroupUpdateDialog(resources[0]))
22 const msAdvancedAction: MultiSelectMenuAction = {
23 name: ContextMenuActionNames.API_DETAILS,
27 execute: (dispatch, resources) => {
28 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
32 const msViewDetailsAction: MultiSelectMenuAction = {
33 name: ContextMenuActionNames.VIEW_DETAILS,
37 execute: (dispatch, resources) => {
38 dispatch<any>(toggleDetailsPanel(resources[0].uuid));
42 const msRemoveGroupAction: MultiSelectMenuAction = {
43 name: ContextMenuActionNames.REMOVE,
47 execute: (dispatch, resources) => {
48 resources.forEach(resource => dispatch<any>(openRemoveGroupDialog(resource.uuid, resources.length)));
52 export const msGroupActionSet: MultiSelectMenuActionSet = [