X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0f5b0542513b572959e39400bae42e69aeb1a7b6..525e81bdbe18ea369f5a61a713e743608bab2e42:/services/workbench2/src/views-components/context-menu/action-sets/ssh-key-action-set.ts diff --git a/services/workbench2/src/views-components/context-menu/action-sets/ssh-key-action-set.ts b/services/workbench2/src/views-components/context-menu/action-sets/ssh-key-action-set.ts index d1a94cd311..c31e1681a4 100644 --- a/services/workbench2/src/views-components/context-menu/action-sets/ssh-key-action-set.ts +++ b/services/workbench2/src/views-components/context-menu/action-sets/ssh-key-action-set.ts @@ -2,27 +2,33 @@ // // 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 { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set'; +import { AdvancedIcon, RemoveIcon, AttributesIcon } from 'components/icon/icon'; import { openSshKeyRemoveDialog, openSshKeyAttributesDialog } from 'store/auth/auth-action-ssh'; import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab'; -export const sshKeyActionSet: ContextMenuActionSet = [[{ - name: "Attributes", - icon: AttributesIcon, - execute: (dispatch, { uuid }) => { - dispatch(openSshKeyAttributesDialog(uuid)); - } -}, { - name: "API Details", - icon: AdvancedIcon, - execute: (dispatch, { uuid }) => { - dispatch(openAdvancedTabDialog(uuid)); - } -}, { - name: "Remove", - icon: RemoveIcon, - execute: (dispatch, { uuid }) => { - dispatch(openSshKeyRemoveDialog(uuid)); - } -}]]; +export const sshKeyActionSet: ContextMenuActionSet = [ + [ + { + name: 'Attributes', + icon: AttributesIcon, + execute: (dispatch, resources) => { + dispatch(openSshKeyAttributesDialog(resources[0].uuid)); + }, + }, + { + name: 'API Details', + icon: AdvancedIcon, + execute: (dispatch, resources) => { + dispatch(openAdvancedTabDialog(resources[0].uuid)); + }, + }, + { + name: 'Remove', + icon: RemoveIcon, + execute: (dispatch, resources) => { + dispatch(openSshKeyRemoveDialog(resources[0].uuid)); + }, + }, + ], +];