Merge branch '14528_table_view_and_actions'
[arvados.git] / src / views-components / context-menu / action-sets / ssh-key-action-set.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set";
6 import { AdvancedIcon, RemoveIcon, AttributesIcon } from "~/components/icon/icon";
7 import { openSshKeyRemoveDialog, openSshKeyAttributesDialog } from '~/store/auth/auth-action';
8
9 export const sshKeyActionSet: ContextMenuActionSet = [[{
10     name: "Attributes",
11     icon: AttributesIcon,
12     execute: (dispatch, { index }) => {
13         dispatch<any>(openSshKeyAttributesDialog(index!));
14     }
15 }, {
16     name: "Advanced",
17     icon: AdvancedIcon,
18     execute: (dispatch, { uuid, index }) => {
19         // ToDo
20     }
21 }, {
22     name: "Remove",
23     icon: RemoveIcon,
24     execute: (dispatch, { uuid }) => {
25         dispatch<any>(openSshKeyRemoveDialog(uuid));
26     }
27 }]];