Merge branch '18874-merge-wb2'
[arvados.git] / services / workbench2 / src / views-components / context-menu / action-sets / group-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 "views-components/context-menu/context-menu-action-set";
6 import { RenameIcon, AdvancedIcon, RemoveIcon, AttributesIcon } from "components/icon/icon";
7 import { openAdvancedTabDialog } from "store/advanced-tab/advanced-tab";
8 import { openGroupAttributes, openRemoveGroupDialog, openGroupUpdateDialog } from "store/groups-panel/groups-panel-actions";
9
10 export const groupActionSet: ContextMenuActionSet = [[{
11     name: "Rename",
12     icon: RenameIcon,
13     execute: (dispatch, resource) => {
14         dispatch<any>(openGroupUpdateDialog(resource));
15     }
16 }, {
17     name: "Attributes",
18     icon: AttributesIcon,
19     execute: (dispatch, { uuid }) => {
20         dispatch<any>(openGroupAttributes(uuid));
21     }
22 }, {
23     name: "API Details",
24     icon: AdvancedIcon,
25     execute: (dispatch, resource) => {
26         dispatch<any>(openAdvancedTabDialog(resource.uuid));
27     }
28 }, {
29     name: "Remove",
30     icon: RemoveIcon,
31     execute: (dispatch, { uuid }) => {
32         dispatch<any>(openRemoveGroupDialog(uuid));
33     }
34 }]];