Merge branch '21128-toolbar-context-menu'
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / keep-service-action-set.ts
index 807a3abf59783a73f3c56bcef40c69fc28c0af2e..2957f008cd055f04fea2533e3a5e9e28ee96dfac 100644 (file)
@@ -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, { uuid }) => {
-        dispatch<any>(openKeepServiceAttributesDialog(uuid));
-    }
-}, {
-    name: "Advanced",
-    icon: AdvancedIcon,
-    execute: (dispatch, { uuid }) => {
-        dispatch<any>(openAdvancedTabDialog(uuid));
-    }
-}, {
-    name: "Remove",
-    icon: RemoveIcon,
-    execute: (dispatch, { uuid }) => {
-        dispatch<any>(openKeepServiceRemoveDialog(uuid));
-    }
-}]];
+export const keepServiceActionSet: ContextMenuActionSet = [
+    [
+        {
+            name: 'Attributes',
+            icon: AttributesIcon,
+            execute: (dispatch, resources) => {
+                 dispatch<any>(openKeepServiceAttributesDialog(resources[0].uuid));
+            },
+        },
+        {
+            name: 'API Details',
+            icon: AdvancedIcon,
+            execute: (dispatch, resources) => {
+                 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
+            },
+        },
+        {
+            name: 'Remove',
+            icon: RemoveIcon,
+            execute: (dispatch, resources) => {
+                 dispatch<any>(openKeepServiceRemoveDialog(resources[0].uuid));
+            },
+        },
+    ],
+];