-export const trashedCollectionActionSet: ContextMenuActionSet = [[
- {
- icon: DetailsIcon,
- name: "View details",
- execute: dispatch => {
- dispatch<any>(toggleDetailsPanel());
- }
- },
- {
- icon: ProvenanceGraphIcon,
- name: "Provenance graph",
- execute: (dispatch, resource) => {
- // add code
- }
- },
- {
- icon: AdvancedIcon,
- name: "Advanced",
- execute: (dispatch, resource) => {
- dispatch<any>(openAdvancedTabDialog(resource.uuid));
- }
- },
- {
- icon: RestoreFromTrashIcon,
- name: "Restore",
- execute: (dispatch, resource) => {
- dispatch<any>(toggleCollectionTrashed(resource.uuid, true));
- }
- },
-]];
+export const trashedCollectionActionSet: ContextMenuActionSet = [
+ [
+ {
+ icon: DetailsIcon,
+ name: 'View details',
+ execute: (dispatch) => {
+ dispatch<any>(toggleDetailsPanel());
+ },
+ },
+ {
+ icon: ProvenanceGraphIcon,
+ name: 'Provenance graph',
+ execute: (dispatch, resource) => {
+ // add code
+ },
+ },
+ {
+ icon: AdvancedIcon,
+ name: 'API Details',
+ execute: (dispatch, resources) => {
+ dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
+ },
+ },
+ {
+ icon: RestoreFromTrashIcon,
+ name: 'Restore',
+ execute: (dispatch, resources) => {
+ resources.forEach((resource) => dispatch<any>(toggleCollectionTrashed(resource.uuid, true)));
+ },
+ },
+ ],
+];