1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { ContextMenuActionSet, ContextMenuActionNames } from 'views-components/context-menu/context-menu-action-set';
6 import { AdvancedIcon, RemoveIcon, ShareIcon, AttributesIcon } from 'components/icon/icon';
7 import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
8 import { openRepositoryAttributes, openRemoveRepositoryDialog } from 'store/repositories/repositories-actions';
9 import { openSharingDialog } from 'store/sharing-dialog/sharing-dialog-actions';
11 export const repositoryActionSet: ContextMenuActionSet = [
14 name: ContextMenuActionNames.ATTRIBUTES,
16 execute: (dispatch, resources) => {
17 dispatch<any>(openRepositoryAttributes(resources[0].uuid));
21 name: ContextMenuActionNames.SHARE,
23 execute: (dispatch, resources) => {
24 dispatch<any>(openSharingDialog(resources[0].uuid));
28 name: ContextMenuActionNames.API_DETAILS,
30 execute: (dispatch, resources) => {
31 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
35 name: ContextMenuActionNames.REMOVE,
37 execute: (dispatch, resources) => {
38 dispatch<any>(openRemoveRepositoryDialog(resources[0].uuid));