19231: Add smaller page sizes (10 and 20 items) to load faster
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / search-results-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 "../context-menu-action-set";
6 import { DetailsIcon, AdvancedIcon, OpenIcon, Link } from 'components/icon/icon';
7 import { openAdvancedTabDialog } from "store/advanced-tab/advanced-tab";
8 import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
9 import { copyToClipboardAction, openInNewTabAction } from "store/open-in-new-tab/open-in-new-tab.actions";
10
11 export const searchResultsActionSet: ContextMenuActionSet = [
12     [
13         {
14             icon: OpenIcon,
15             name: "Open in new tab",
16             execute: (dispatch, resource) => {
17                 dispatch<any>(openInNewTabAction(resource));
18             }
19         },
20         {
21             icon: Link,
22             name: "Copy to clipboard",
23             execute: (dispatch, resource) => {
24                 dispatch<any>(copyToClipboardAction(resource));
25             }
26         },
27         {
28             icon: DetailsIcon,
29             name: "View details",
30             execute: dispatch => {
31                 dispatch<any>(toggleDetailsPanel());
32             }
33         },
34         {
35             icon: AdvancedIcon,
36             name: "Advanced",
37             execute: (dispatch, resource) => {
38                 dispatch<any>(openAdvancedTabDialog(resource.uuid));
39             }
40         },
41     ]
42 ];