18587: Temporarily disabling the 'copy selected into collection' feature.
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-files-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 { collectionPanelFilesAction, openMultipleFilesRemoveDialog } from "store/collection-panel/collection-panel-files/collection-panel-files-actions";
7 import { openCollectionPartialCopyDialog, openCollectionPartialCopyToSelectedCollectionDialog } from 'store/collections/collection-partial-copy-actions';
8
9 // These action sets are used on the multi-select actions button.
10 export const readOnlyCollectionFilesActionSet: ContextMenuActionSet = [[
11     {
12         name: "Select all",
13         execute: dispatch => {
14             dispatch(collectionPanelFilesAction.SELECT_ALL_COLLECTION_FILES());
15         }
16     },
17     {
18         name: "Unselect all",
19         execute: dispatch => {
20             dispatch(collectionPanelFilesAction.UNSELECT_ALL_COLLECTION_FILES());
21         }
22     },
23     {
24         name: "Create a new collection with selected",
25         execute: dispatch => {
26             dispatch<any>(openCollectionPartialCopyDialog());
27         }
28     },
29     // Disabled while addressing #18587
30     // {
31     //     name: "Copy selected into the collection",
32     //     execute: dispatch => {
33     //         dispatch<any>(openCollectionPartialCopyToSelectedCollectionDialog());
34     //     }
35     // }
36 ]];
37
38 export const collectionFilesActionSet: ContextMenuActionSet = readOnlyCollectionFilesActionSet.concat([[
39     {
40         name: "Remove selected",
41         execute: dispatch => {
42             dispatch(openMultipleFilesRemoveDialog());
43         }
44     },
45 ]]);