X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2508b089d2369bf57811f9f96c14c2ee22dd664f..96f0b43ee4bb07e87dbeef8514a51857db069351:/services/workbench2/src/views-components/context-menu/action-sets/link-action-set.ts diff --git a/services/workbench2/src/views-components/context-menu/action-sets/link-action-set.ts b/services/workbench2/src/views-components/context-menu/action-sets/link-action-set.ts index 929a65a974..86458423c2 100644 --- a/services/workbench2/src/views-components/context-menu/action-sets/link-action-set.ts +++ b/services/workbench2/src/views-components/context-menu/action-sets/link-action-set.ts @@ -4,25 +4,31 @@ import { openLinkAttributesDialog, openLinkRemoveDialog } from 'store/link-panel/link-panel-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 { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set'; +import { AdvancedIcon, RemoveIcon, AttributesIcon } from 'components/icon/icon'; -export const linkActionSet: ContextMenuActionSet = [[{ - name: "Attributes", - icon: AttributesIcon, - execute: (dispatch, { uuid }) => { - dispatch(openLinkAttributesDialog(uuid)); - } -}, { - name: "API Details", - icon: AdvancedIcon, - execute: (dispatch, { uuid }) => { - dispatch(openAdvancedTabDialog(uuid)); - } -}, { - name: "Remove", - icon: RemoveIcon, - execute: (dispatch, { uuid }) => { - dispatch(openLinkRemoveDialog(uuid)); - } -}]]; +export const linkActionSet: ContextMenuActionSet = [ + [ + { + name: 'Attributes', + icon: AttributesIcon, + execute: (dispatch, resources) => { + dispatch(openLinkAttributesDialog(resources[0].uuid)); + }, + }, + { + name: 'API Details', + icon: AdvancedIcon, + execute: (dispatch, resources) => { + dispatch(openAdvancedTabDialog(resources[0].uuid)); + }, + }, + { + name: 'Remove', + icon: RemoveIcon, + execute: (dispatch, resources) => { + dispatch(openLinkRemoveDialog(resources[0].uuid)); + }, + }, + ], +];