X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/61cd8fe9d4fe4dfeab443f31bbbc5effa5176765..3612a36e473bf1599180a9b3b90b03ca0aaafb45:/src/views-components/context-menu/action-sets/group-action-set.ts diff --git a/src/views-components/context-menu/action-sets/group-action-set.ts b/src/views-components/context-menu/action-sets/group-action-set.ts index 8d718a3369..816583faa9 100644 --- a/src/views-components/context-menu/action-sets/group-action-set.ts +++ b/src/views-components/context-menu/action-sets/group-action-set.ts @@ -2,27 +2,40 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set"; -import { AdvancedIcon, RemoveIcon, AttributesIcon } from "~/components/icon/icon"; -import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab"; -import { openGroupAttributes, openRemoveGroupDialog } from "~/store/groups-panel/groups-panel-actions"; +import { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set'; +import { RenameIcon, AdvancedIcon, RemoveIcon, AttributesIcon } from 'components/icon/icon'; +import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab'; +import { openGroupAttributes, openRemoveGroupDialog, openGroupUpdateDialog } from 'store/groups-panel/groups-panel-actions'; -export const groupActionSet: ContextMenuActionSet = [[{ - name: "Attributes", - icon: AttributesIcon, - execute: (dispatch, { uuid }) => { - dispatch(openGroupAttributes(uuid)); - } -}, { - name: "Advanced", - icon: AdvancedIcon, - execute: (dispatch, resource) => { - dispatch(openAdvancedTabDialog(resource.uuid)); - } -}, { - name: "Remove", - icon: RemoveIcon, - execute: (dispatch, { uuid }) => { - dispatch(openRemoveGroupDialog(uuid)); - } -}]]; \ No newline at end of file +export const groupActionSet: ContextMenuActionSet = [ + [ + { + name: 'Rename', + icon: RenameIcon, + execute: (dispatch, resources) => { + dispatch(openGroupUpdateDialog(resources[0])) + }, + }, + { + name: 'Attributes', + icon: AttributesIcon, + execute: (dispatch, resources) => { + dispatch(openGroupAttributes(resources[0].uuid)) + }, + }, + { + name: 'API Details', + icon: AdvancedIcon, + execute: (dispatch, resources) => { + dispatch(openAdvancedTabDialog(resources[0].uuid)); + }, + }, + { + name: 'Remove', + icon: RemoveIcon, + execute: (dispatch, resources) => { + dispatch(openRemoveGroupDialog(resources[0].uuid)); + }, + }, + ], +];