15768: removed vestigial foreach loops in project-actions Arvados-DCO-1.1-Signed...
[arvados.git] / src / views-components / context-menu / action-sets / ssh-key-action-set.ts
index d1a94cd311318e76cdbf0bfd9f61fada1a549838..f0620ede0a5419d3829bf3abd834e3787591742b 100644 (file)
@@ -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<any>(openSshKeyAttributesDialog(uuid));
-    }
-}, {
-    name: "API Details",
-    icon: AdvancedIcon,
-    execute: (dispatch, { uuid }) => {
-        dispatch<any>(openAdvancedTabDialog(uuid));
-    }
-}, {
-    name: "Remove",
-    icon: RemoveIcon,
-    execute: (dispatch, { uuid }) => {
-        dispatch<any>(openSshKeyRemoveDialog(uuid));
-    }
-}]];
+export const sshKeyActionSet: ContextMenuActionSet = [
+    [
+        {
+            name: 'Attributes',
+            icon: AttributesIcon,
+            execute: (dispatch, resources) => {
+                resources.forEach((resource) => dispatch<any>(openSshKeyAttributesDialog(resource.uuid)));
+            },
+        },
+        {
+            name: 'API Details',
+            icon: AdvancedIcon,
+            execute: (dispatch, resources) => {
+                resources.forEach((resource) => dispatch<any>(openAdvancedTabDialog(resource.uuid)));
+            },
+        },
+        {
+            name: 'Remove',
+            icon: RemoveIcon,
+            execute: (dispatch, resources) => {
+                resources.forEach((resource) => dispatch<any>(openSshKeyRemoveDialog(resource.uuid)));
+            },
+        },
+    ],
+];