X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8695e9d621330e691fbcc4bbc1d600d91bae2ac6..3612a36e473bf1599180a9b3b90b03ca0aaafb45:/src/views-components/context-menu/action-sets/keep-service-action-set.ts diff --git a/src/views-components/context-menu/action-sets/keep-service-action-set.ts b/src/views-components/context-menu/action-sets/keep-service-action-set.ts index 5d27e4e967..2957f008cd 100644 --- a/src/views-components/context-menu/action-sets/keep-service-action-set.ts +++ b/src/views-components/context-menu/action-sets/keep-service-action-set.ts @@ -2,27 +2,33 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { openKeepServiceAttributesDialog, openKeepServiceRemoveDialog } from '~/store/keep-services/keep-services-actions'; -import { openAdvancedTabDialog } from '~/store/advanced-tab/advanced-tab'; -import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set"; -import { AdvancedIcon, RemoveIcon, AttributesIcon } from "~/components/icon/icon"; +import { openKeepServiceAttributesDialog, openKeepServiceRemoveDialog } from 'store/keep-services/keep-services-actions'; +import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab'; +import { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set'; +import { AdvancedIcon, RemoveIcon, AttributesIcon } from 'components/icon/icon'; -export const keepServiceActionSet: ContextMenuActionSet = [[{ - name: "Attributes", - icon: AttributesIcon, - execute: (dispatch, { index }) => { - dispatch(openKeepServiceAttributesDialog(index!)); - } -}, { - name: "Advanced", - icon: AdvancedIcon, - execute: (dispatch, { uuid, index }) => { - dispatch(openAdvancedTabDialog(uuid, index)); - } -}, { - name: "Remove", - icon: RemoveIcon, - execute: (dispatch, { uuid }) => { - dispatch(openKeepServiceRemoveDialog(uuid)); - } -}]]; +export const keepServiceActionSet: ContextMenuActionSet = [ + [ + { + name: 'Attributes', + icon: AttributesIcon, + execute: (dispatch, resources) => { + dispatch(openKeepServiceAttributesDialog(resources[0].uuid)); + }, + }, + { + name: 'API Details', + icon: AdvancedIcon, + execute: (dispatch, resources) => { + dispatch(openAdvancedTabDialog(resources[0].uuid)); + }, + }, + { + name: 'Remove', + icon: RemoveIcon, + execute: (dispatch, resources) => { + dispatch(openKeepServiceRemoveDialog(resources[0].uuid)); + }, + }, + ], +];