X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1bbdd9c70d0099e0bf46b3c1ac55e423e3406314..c5308511f31f9713ce961a72b29c39b7b64baaa6:/src/views-components/context-menu/action-sets/ssh-key-action-set.ts diff --git a/src/views-components/context-menu/action-sets/ssh-key-action-set.ts b/src/views-components/context-menu/action-sets/ssh-key-action-set.ts index 3fa2f16fa4..f0620ede0a 100644 --- a/src/views-components/context-menu/action-sets/ssh-key-action-set.ts +++ b/src/views-components/context-menu/action-sets/ssh-key-action-set.ts @@ -2,26 +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 { openSshKeyRemoveDialog, openSshKeyAttributesDialog } from '~/store/auth/auth-action'; +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, { index }) => { - dispatch(openSshKeyAttributesDialog(index!)); - } -}, { - name: "Advanced", - icon: AdvancedIcon, - execute: (dispatch, { uuid, index }) => { - // ToDo - } -}, { - name: "Remove", - icon: RemoveIcon, - execute: (dispatch, { uuid }) => { - dispatch(openSshKeyRemoveDialog(uuid)); - } -}]]; +export const sshKeyActionSet: ContextMenuActionSet = [ + [ + { + name: 'Attributes', + icon: AttributesIcon, + execute: (dispatch, resources) => { + resources.forEach((resource) => dispatch(openSshKeyAttributesDialog(resource.uuid))); + }, + }, + { + name: 'API Details', + icon: AdvancedIcon, + execute: (dispatch, resources) => { + resources.forEach((resource) => dispatch(openAdvancedTabDialog(resource.uuid))); + }, + }, + { + name: 'Remove', + icon: RemoveIcon, + execute: (dispatch, resources) => { + resources.forEach((resource) => dispatch(openSshKeyRemoveDialog(resource.uuid))); + }, + }, + ], +];