21448: replaced all context menu names with string constants Arvados-DCO-1.1-Signed...
authorLisa Knox <lisaknox83@gmail.com>
Thu, 28 Mar 2024 13:21:21 +0000 (09:21 -0400)
committerLisa Knox <lisaknox83@gmail.com>
Thu, 28 Mar 2024 13:21:21 +0000 (09:21 -0400)
28 files changed:
services/workbench2/src/views-components/context-menu/action-sets/api-client-authorization-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/collection-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/collection-files-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/collection-files-not-selected-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/favorite-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/group-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/group-member-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/keep-service-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/link-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/permission-edit-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/process-resource-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/project-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/project-admin-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/repository-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/resource-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/root-project-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/search-results-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/ssh-key-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/trash-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/trashed-collection-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/user-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/virtual-machine-action-set.ts
services/workbench2/src/views-components/context-menu/action-sets/workflow-action-set.ts
services/workbench2/src/views-components/context-menu/context-menu-action-set.ts
services/workbench2/src/views-components/multiselect-toolbar/ms-collection-action-set.ts
services/workbench2/src/views-components/multiselect-toolbar/ms-menu-actions.ts
services/workbench2/src/views-components/multiselect-toolbar/ms-project-action-set.ts

index 8e75d22f6714d97853f2d7061aa9167dc793a072..4a01864f39d706bda248814cde9b563e308bd8b9 100644 (file)
@@ -7,27 +7,27 @@ import {
     openApiClientAuthorizationRemoveDialog,
 } from "store/api-client-authorizations/api-client-authorizations-actions";
 import { openAdvancedTabDialog } from "store/advanced-tab/advanced-tab";
-import { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
+import { ContextMenuActionSet, ContextMenuActionNames } from "views-components/context-menu/context-menu-action-set";
 import { AdvancedIcon, RemoveIcon, AttributesIcon } from "components/icon/icon";
 
 export const apiClientAuthorizationActionSet: ContextMenuActionSet = [
     [
         {
-            name: "Attributes",
+            name: ContextMenuActionNames.ATTRIBUTES,
             icon: AttributesIcon,
             execute: (dispatch, resources) => {
                     dispatch<any>(openApiClientAuthorizationAttributesDialog(resources[0].uuid));
             },
         },
         {
-            name: "API Details",
+            name: ContextMenuActionNames.API_DETAILS,
             icon: AdvancedIcon,
             execute: (dispatch, resources) => {
                     dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
         },
         {
-            name: "Remove",
+            name: ContextMenuActionNames.REMOVE,
             icon: RemoveIcon,
             execute: (dispatch, resources) => {
                     dispatch<any>(openApiClientAuthorizationRemoveDialog(resources[0].uuid));
index 16f87aa4811703d0e4a3bf8dbc591f2c7cbbacbd..f046ebece3307533d304bc5224d65ed92b28b5bf 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuAction, ContextMenuActionSet } from "../context-menu-action-set";
+import { ContextMenuAction, ContextMenuActionSet, ContextMenuActionNames } from "../context-menu-action-set";
 import { ToggleFavoriteAction } from "../actions/favorite-action";
 import { toggleFavorite } from "store/favorites/favorites-actions";
 import {
@@ -36,7 +36,7 @@ import { ContextMenuResource } from "store/context-menu/context-menu-actions";
 
 const toggleFavoriteAction: ContextMenuAction = {
     component: ToggleFavoriteAction,
-    name: "Add to Favorites",
+    name: ContextMenuActionNames.ADD_TO_FAVORITES,
     execute: (dispatch, resources) => {
         for (const resource of [...resources]) {
             dispatch<any>(toggleFavorite(resource)).then(() => {
@@ -49,21 +49,21 @@ const commonActionSet: ContextMenuActionSet = [
     [
         {
             icon: OpenIcon,
-            name: "Open in new tab",
+            name: ContextMenuActionNames.OPEN_IN_NEW_TAB,
             execute: (dispatch, resources) => {
                 dispatch<any>(openInNewTabAction(resources[0]));
             },
         },
         {
             icon: Link,
-            name: "Copy to clipboard",
+            name: ContextMenuActionNames.COPY_TO_CLIPBOARD,
             execute: (dispatch, resources) => {
                 dispatch<any>(copyToClipboardAction(resources));
             },
         },
         {
             icon: CopyIcon,
-            name: "Make a copy",
+            name: ContextMenuActionNames.MAKE_A_COPY,
             execute: (dispatch, resources) => {
                 if (resources[0].fromContextMenu || resources.length === 1) dispatch<any>(openCollectionCopyDialog(resources[0]));
                 else dispatch<any>(openMultiCollectionCopyDialog(resources[0]));
@@ -71,14 +71,14 @@ const commonActionSet: ContextMenuActionSet = [
         },
         {
             icon: DetailsIcon,
-            name: "View details",
+            name: ContextMenuActionNames.VIEW_DETAILS,
             execute: dispatch => {
                 dispatch<any>(toggleDetailsPanel());
             },
         },
         {
             icon: AdvancedIcon,
-            name: "API Details",
+            name: ContextMenuActionNames.API_DETAILS,
             execute: (dispatch, resources) => {
                 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
@@ -92,7 +92,7 @@ export const readOnlyCollectionActionSet: ContextMenuActionSet = [
         toggleFavoriteAction,
         {
             icon: FolderSharedIcon,
-            name: "Open with 3rd party client",
+            name: ContextMenuActionNames.OPEN_WITH_3RD_PARTY_CLIENT,
             execute: (dispatch, resources) => {
                 dispatch<any>(openWebDavS3InfoDialog(resources[0].uuid));
             },
@@ -105,26 +105,26 @@ export const collectionActionSet: ContextMenuActionSet = [
         ...readOnlyCollectionActionSet.reduce((prev, next) => prev.concat(next), []),
         {
             icon: RenameIcon,
-            name: "Edit collection",
+            name: ContextMenuActionNames.EDIT_COLLECTION,
             execute: (dispatch, resources) => {
                 dispatch<any>(openCollectionUpdateDialog(resources[0]));
             },
         },
         {
             icon: ShareIcon,
-            name: "Share",
+            name: ContextMenuActionNames.SHARE,
             execute: (dispatch, resources) => {
                 dispatch<any>(openSharingDialog(resources[0].uuid));
             },
         },
         {
             icon: MoveToIcon,
-            name: "Move to",
+            name: ContextMenuActionNames.MOVE_TO,
             execute: (dispatch, resources) => dispatch<any>(openMoveCollectionDialog(resources[0])),
         },
         {
             component: ToggleTrashAction,
-            name: "Move to trash",
+            name: ContextMenuActionNames.MOVE_TO_TRASH,
             execute: (dispatch, resources: ContextMenuResource[]) => {
                 for (const resource of [...resources]) {
                     dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!));
@@ -139,7 +139,7 @@ export const collectionAdminActionSet: ContextMenuActionSet = [
         ...collectionActionSet.reduce((prev, next) => prev.concat(next), []),
         {
             component: TogglePublicFavoriteAction,
-            name: "Add to public favorites",
+            name: ContextMenuActionNames.ADD_TO_PUBLIC_FAVORITES,
             execute: (dispatch, resources) => {
                 for (const resource of [...resources]) {
                     dispatch<any>(togglePublicFavorite(resource)).then(() => {
@@ -156,7 +156,7 @@ export const oldCollectionVersionActionSet: ContextMenuActionSet = [
         ...commonActionSet.reduce((prev, next) => prev.concat(next), []),
         {
             icon: RestoreVersionIcon,
-            name: "Restore version",
+            name: ContextMenuActionNames.RESTORE_VERSION,
             execute: (dispatch, resources) => {
                 for (const resource of [...resources]) {
                     dispatch<any>(openRestoreCollectionVersionDialog(resource.uuid));
index 80deb37cade38c6768421f80187ee7ac6f5a0fe7..a117cbc1b07e3ebbb030176aabda84c278a29647 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuAction, ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
+import { ContextMenuAction, ContextMenuActionSet, ContextMenuActionNames } from "views-components/context-menu/context-menu-action-set";
 import { collectionPanelFilesAction, openMultipleFilesRemoveDialog } from "store/collection-panel/collection-panel-files/collection-panel-files-actions";
 import {
     openCollectionPartialCopyMultipleToNewCollectionDialog,
@@ -14,14 +14,14 @@ import { FileCopyIcon, FileMoveIcon, RemoveIcon, SelectAllIcon, SelectNoneIcon }
 
 const copyActions: ContextMenuAction[] = [
     {
-        name: "Copy selected into new collection",
+        name: ContextMenuActionNames.COPY_SELECTED_INTO_NEW_COLLECTION,
         icon: FileCopyIcon,
         execute: dispatch => {
             dispatch<any>(openCollectionPartialCopyMultipleToNewCollectionDialog());
         }
     },
     {
-        name: "Copy selected into existing collection",
+        name: ContextMenuActionNames.COPY_SELECTED_INTO_EXISTING_COLLECTION,
         icon: FileCopyIcon,
         execute: dispatch => {
             dispatch<any>(openCollectionPartialCopyMultipleToExistingCollectionDialog());
@@ -32,7 +32,7 @@ const copyActions: ContextMenuAction[] = [
 const copyActionsMultiple: ContextMenuAction[] = [
     ...copyActions,
     {
-        name: "Copy selected into separate collections",
+        name: ContextMenuActionNames.COPY_SELECTED_INTO_SEPARATE_COLLECTIONS,
         icon: FileCopyIcon,
         execute: dispatch => {
             dispatch<any>(openCollectionPartialCopyToSeparateCollectionsDialog());
@@ -42,14 +42,14 @@ const copyActionsMultiple: ContextMenuAction[] = [
 
 const moveActions: ContextMenuAction[] = [
     {
-        name: "Move selected into new collection",
+        name: ContextMenuActionNames.MOVE_SELECTED_INTO_NEW_COLLECTION,
         icon: FileMoveIcon,
         execute: dispatch => {
             dispatch<any>(openCollectionPartialMoveMultipleToNewCollectionDialog());
         }
     },
     {
-        name: "Move selected into existing collection",
+        name: ContextMenuActionNames.MOVE_SELECTED_INTO_EXISTING_COLLECTION,
         icon: FileMoveIcon,
         execute: dispatch => {
             dispatch<any>(openCollectionPartialMoveMultipleToExistingCollectionDialog());
@@ -60,7 +60,7 @@ const moveActions: ContextMenuAction[] = [
 const moveActionsMultiple: ContextMenuAction[] = [
     ...moveActions,
     {
-        name: "Move selected into separate collections",
+        name: ContextMenuActionNames.MOVE_SELECTED_INTO_SEPARATE_COLLECTIONS,
         icon: FileMoveIcon,
         execute: dispatch => {
             dispatch<any>(openCollectionPartialMoveToSeparateCollectionsDialog());
@@ -70,14 +70,14 @@ const moveActionsMultiple: ContextMenuAction[] = [
 
 const selectActions: ContextMenuAction[] = [
     {
-        name: "Select all",
+        name: ContextMenuActionNames.SELECT_ALL,
         icon: SelectAllIcon,
         execute: dispatch => {
             dispatch(collectionPanelFilesAction.SELECT_ALL_COLLECTION_FILES());
         }
     },
     {
-        name: "Unselect all",
+        name: ContextMenuActionNames.UNSELECT_ALL,
         icon: SelectNoneIcon,
         execute: dispatch => {
             dispatch(collectionPanelFilesAction.UNSELECT_ALL_COLLECTION_FILES());
@@ -86,7 +86,7 @@ const selectActions: ContextMenuAction[] = [
 ];
 
 const removeAction: ContextMenuAction = {
-    name: "Remove selected",
+    name: ContextMenuActionNames.REMOVE_SELECTED,
     icon: RemoveIcon,
     execute: dispatch => {
         dispatch(openMultipleFilesRemoveDialog());
index e42c82bf8e22809f895c1c7e3c9164b5864e1e17..d22c1dcdb087992d0b6bb8f0ac90de5d765ae76f 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from "../context-menu-action-set";
+import { ContextMenuActionSet, ContextMenuActionNames } from "../context-menu-action-set";
 import { FileCopyIcon, FileMoveIcon, RemoveIcon, RenameIcon } from "components/icon/icon";
 import { DownloadCollectionFileAction } from "../actions/download-collection-file-action";
 import { openFileRemoveDialog, openRenameFileDialog } from "store/collection-panel/collection-panel-files/collection-panel-files-actions";
@@ -20,14 +20,14 @@ import {
 export const readOnlyCollectionDirectoryItemActionSet: ContextMenuActionSet = [
     [
         {
-            name: "Copy item into new collection",
+            name: ContextMenuActionNames.COPY_ITEM_INTO_NEW_COLLECTION,
             icon: FileCopyIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openCollectionPartialCopyToNewCollectionDialog(resources[0]));
             },
         },
         {
-            name: "Copy item into existing collection",
+            name: ContextMenuActionNames.COPY_ITEM_INTO_EXISTING_COLLECTION,
             icon: FileCopyIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openCollectionPartialCopyToExistingCollectionDialog(resources[0]));
@@ -35,14 +35,14 @@ export const readOnlyCollectionDirectoryItemActionSet: ContextMenuActionSet = [
         },
         {
             component: CollectionFileViewerAction,
-            name: "Open in new tab",
+            name: ContextMenuActionNames.OPEN_IN_NEW_TAB,
             execute: () => {
                 return;
             },
         },
         {
             component: CollectionCopyToClipboardAction,
-            name: "Copy to clipboard",
+            name: ContextMenuActionNames.COPY_TO_CLIPBOARD,
             execute: () => {
                 return;
             },
@@ -54,7 +54,7 @@ export const readOnlyCollectionFileItemActionSet: ContextMenuActionSet = [
     [
         {
             component: DownloadCollectionFileAction,
-            name: "Download",
+            name: ContextMenuActionNames.DOWNLOAD,
             execute: () => {
                 return;
             },
@@ -66,21 +66,21 @@ export const readOnlyCollectionFileItemActionSet: ContextMenuActionSet = [
 const writableActionSet: ContextMenuActionSet = [
     [
         {
-            name: "Move item into new collection",
+            name: ContextMenuActionNames.MOVE_ITEM_INTO_NEW_COLLECTION,
             icon: FileMoveIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openCollectionPartialMoveToNewCollectionDialog(resources[0]));
             },
         },
         {
-            name: "Move item into existing collection",
+            name: ContextMenuActionNames.MOVE_ITEM_INTO_EXISTING_COLLECTION,
             icon: FileMoveIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openCollectionPartialMoveToExistingCollectionDialog(resources[0]));
             },
         },
         {
-            name: "Rename",
+            name: ContextMenuActionNames.RENAME,
             icon: RenameIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(
@@ -93,7 +93,7 @@ const writableActionSet: ContextMenuActionSet = [
             },
         },
         {
-            name: "Remove",
+            name: ContextMenuActionNames.REMOVE,
             icon: RemoveIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openFileRemoveDialog(resources[0].uuid));
index 1e31d11c800742eac41659e502513aeb39d4d86f..b457efdf9a58faa9838dc7fa8b75255023dec483 100644 (file)
@@ -2,12 +2,12 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
+import { ContextMenuActionSet, ContextMenuActionNames } from "views-components/context-menu/context-menu-action-set";
 import { collectionPanelFilesAction } from "store/collection-panel/collection-panel-files/collection-panel-files-actions";
 import { SelectAllIcon } from "components/icon/icon";
 
 export const collectionFilesNotSelectedActionSet: ContextMenuActionSet = [[{
-    name: "Select all",
+    name: ContextMenuActionNames.SELECT_ALL,
     icon: SelectAllIcon,
     execute: dispatch => {
         dispatch(collectionPanelFilesAction.SELECT_ALL_COLLECTION_FILES());
index c01d8da9b5359ec07ad6fe9e3fee0cc9a5e8c986..115eec97eb32fe1423ae6122afadb47dab2025fd 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from '../context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from '../context-menu-action-set';
 import { ToggleFavoriteAction } from '../actions/favorite-action';
 import { toggleFavorite } from 'store/favorites/favorites-actions';
 import { favoritePanelActions } from 'store/favorite-panel/favorite-panel-action';
@@ -11,7 +11,7 @@ export const favoriteActionSet: ContextMenuActionSet = [
     [
         {
             component: ToggleFavoriteAction,
-            name: 'Add to Favorites',
+            name: ContextMenuActionNames.ADD_TO_FAVORITES,
             execute: (dispatch, resources) => {
                 resources.forEach((resource) =>
                     dispatch<any>(toggleFavorite(resource)).then(() => {
index 816583faa9f05e3c2d5291362dc12449b503dc92..2c7f164ab1fd672f0fb015b2ca125f985ab1c4aa 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from 'views-components/context-menu/context-menu-action-set';
 import { RenameIcon, AdvancedIcon, RemoveIcon, AttributesIcon } from 'components/icon/icon';
 import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
 import { openGroupAttributes, openRemoveGroupDialog, openGroupUpdateDialog } from 'store/groups-panel/groups-panel-actions';
@@ -10,28 +10,28 @@ import { openGroupAttributes, openRemoveGroupDialog, openGroupUpdateDialog } fro
 export const groupActionSet: ContextMenuActionSet = [
     [
         {
-            name: 'Rename',
+            name: ContextMenuActionNames.RENAME,
             icon: RenameIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openGroupUpdateDialog(resources[0]))
             },
         },
         {
-            name: 'Attributes',
+            name: ContextMenuActionNames.ATTRIBUTES,
             icon: AttributesIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openGroupAttributes(resources[0].uuid))
             },
         },
         {
-            name: 'API Details',
+            name: ContextMenuActionNames.API_DETAILS,
             icon: AdvancedIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
         },
         {
-            name: 'Remove',
+            name: ContextMenuActionNames.REMOVE,
             icon: RemoveIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openRemoveGroupDialog(resources[0].uuid));
index ad1ce97c2dcb8ba3ee238d7ee10b1a39809f81e7..6b9611caa0c0b72db46cd7ceb01e844c4d4addc7 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from 'views-components/context-menu/context-menu-action-set';
 import { AdvancedIcon, RemoveIcon, AttributesIcon } from 'components/icon/icon';
 import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
 import { openGroupMemberAttributes, openRemoveGroupMemberDialog } from 'store/group-details-panel/group-details-panel-actions';
@@ -10,21 +10,21 @@ import { openGroupMemberAttributes, openRemoveGroupMemberDialog } from 'store/gr
 export const groupMemberActionSet: ContextMenuActionSet = [
     [
         {
-            name: 'Attributes',
+            name: ContextMenuActionNames.ATTRIBUTES,
             icon: AttributesIcon,
             execute: (dispatch, resources) => {
                  dispatch<any>(openGroupMemberAttributes(resources[0].uuid));
             },
         },
         {
-            name: 'API Details',
+            name: ContextMenuActionNames.API_DETAILS,
             icon: AdvancedIcon,
             execute: (dispatch, resources) => {
                  dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
         },
         {
-            name: 'Remove',
+            name: ContextMenuActionNames.REMOVE,
             icon: RemoveIcon,
             execute: (dispatch, resources) => {
                  dispatch<any>(openRemoveGroupMemberDialog(resources[0].uuid));
index 2957f008cd055f04fea2533e3a5e9e28ee96dfac..67ef034d6bd8c39781497254dbc214ce08581833 100644 (file)
@@ -4,27 +4,27 @@
 
 import { openKeepServiceAttributesDialog, openKeepServiceRemoveDialog } from 'store/keep-services/keep-services-actions';
 import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
-import { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from 'views-components/context-menu/context-menu-action-set';
 import { AdvancedIcon, RemoveIcon, AttributesIcon } from 'components/icon/icon';
 
 export const keepServiceActionSet: ContextMenuActionSet = [
     [
         {
-            name: 'Attributes',
+            name: ContextMenuActionNames.ATTRIBUTES,
             icon: AttributesIcon,
             execute: (dispatch, resources) => {
                  dispatch<any>(openKeepServiceAttributesDialog(resources[0].uuid));
             },
         },
         {
-            name: 'API Details',
+            name: ContextMenuActionNames.API_DETAILS,
             icon: AdvancedIcon,
             execute: (dispatch, resources) => {
                  dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
         },
         {
-            name: 'Remove',
+            name: ContextMenuActionNames.REMOVE,
             icon: RemoveIcon,
             execute: (dispatch, resources) => {
                  dispatch<any>(openKeepServiceRemoveDialog(resources[0].uuid));
index 86458423c2e09e489016d3dd8d226c72dd370b8e..89356c0797f39a301c76eb9e296e4a0d1b7225b6 100644 (file)
@@ -4,27 +4,27 @@
 
 import { openLinkAttributesDialog, openLinkRemoveDialog } from 'store/link-panel/link-panel-actions';
 import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
-import { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from 'views-components/context-menu/context-menu-action-set';
 import { AdvancedIcon, RemoveIcon, AttributesIcon } from 'components/icon/icon';
 
 export const linkActionSet: ContextMenuActionSet = [
     [
         {
-            name: 'Attributes',
+            name: ContextMenuActionNames.ATTRIBUTES,
             icon: AttributesIcon,
             execute: (dispatch, resources) => {
                  dispatch<any>(openLinkAttributesDialog(resources[0].uuid));
             },
         },
         {
-            name: 'API Details',
+            name: ContextMenuActionNames.API_DETAILS,
             icon: AdvancedIcon,
             execute: (dispatch, resources) => {
                  dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
         },
         {
-            name: 'Remove',
+            name: ContextMenuActionNames.REMOVE,
             icon: RemoveIcon,
             execute: (dispatch, resources) => {
                  dispatch<any>(openLinkRemoveDialog(resources[0].uuid));
index 4b6950ee24e17b1019afb72bfdd84fc314ca3176..3ae4513107b76647ae36eacb1dfe3901b4ea7705 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from 'views-components/context-menu/context-menu-action-set';
 import { CanReadIcon, CanManageIcon, CanWriteIcon } from 'components/icon/icon';
 import { editPermissionLevel } from 'store/group-details-panel/group-details-panel-actions';
 import { PermissionLevel } from 'models/permission';
@@ -10,21 +10,21 @@ import { PermissionLevel } from 'models/permission';
 export const permissionEditActionSet: ContextMenuActionSet = [
     [
         {
-            name: 'Read',
+            name: ContextMenuActionNames.READ,
             icon: CanReadIcon,
             execute: (dispatch, resources) => {
                 resources.forEach((resource) => dispatch<any>(editPermissionLevel(resource.uuid, PermissionLevel.CAN_READ)));
             },
         },
         {
-            name: 'Write',
+            name: ContextMenuActionNames.WRITE,
             icon: CanWriteIcon,
             execute: (dispatch, resources) => {
                 resources.forEach((resource) => dispatch<any>(editPermissionLevel(resource.uuid, PermissionLevel.CAN_WRITE)));
             },
         },
         {
-            name: 'Manage',
+            name: ContextMenuActionNames.MANAGE,
             icon: CanManageIcon,
             execute: (dispatch, resources) => {
                 resources.forEach((resource) => dispatch<any>(editPermissionLevel(resource.uuid, PermissionLevel.CAN_MANAGE)));
index 58cfb118b6659160ad3439efc76f967e8ee554ca..40d16e9c8ea343e7374bddcd34a01b3fb0ecb209 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from "../context-menu-action-set";
+import { ContextMenuActionSet, ContextMenuActionNames } from "../context-menu-action-set";
 import { ToggleFavoriteAction } from "../actions/favorite-action";
 import { toggleFavorite } from "store/favorites/favorites-actions";
 import {
@@ -36,7 +36,7 @@ export const readOnlyProcessResourceActionSet: ContextMenuActionSet = [
     [
         {
             component: ToggleFavoriteAction,
-            name: "Add to Favorites",
+            name: ContextMenuActionNames.ADD_TO_FAVORITES,
             execute: (dispatch, resources) => {
                 dispatch<any>(toggleFavorite(resources[0])).then(() => {
                     dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
@@ -45,21 +45,21 @@ export const readOnlyProcessResourceActionSet: ContextMenuActionSet = [
         },
         {
             icon: OpenIcon,
-            name: "Open in new tab",
+            name: ContextMenuActionNames.OPEN_IN_NEW_TAB,
             execute: (dispatch, resources) => {
                 dispatch<any>(openInNewTabAction(resources[0]));
             },
         },
         {
             icon: ReRunProcessIcon,
-            name: "Copy and re-run process",
+            name: ContextMenuActionNames.COPY_AND_RERUN_PROCESS,
             execute: (dispatch, resources) => {
                 dispatch<any>(openCopyProcessDialog(resources[0]));
             },
         },
         {
             icon: OutputIcon,
-            name: "Outputs",
+            name: ContextMenuActionNames.OUTPUTS,
             execute: (dispatch, resources) => {
                 if (resources[0]) {
                     dispatch<any>(navigateToOutput(resources[0]));
@@ -68,14 +68,14 @@ export const readOnlyProcessResourceActionSet: ContextMenuActionSet = [
         },
         {
             icon: DetailsIcon,
-            name: "View details",
+            name: ContextMenuActionNames.VIEW_DETAILS,
             execute: dispatch => {
                 dispatch<any>(toggleDetailsPanel());
             },
         },
         {
             icon: AdvancedIcon,
-            name: "API Details",
+            name: ContextMenuActionNames.API_DETAILS,
             execute: (dispatch, resources) => {
                 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
@@ -88,27 +88,27 @@ export const processResourceActionSet: ContextMenuActionSet = [
         ...readOnlyProcessResourceActionSet.reduce((prev, next) => prev.concat(next), []),
         {
             icon: RenameIcon,
-            name: "Edit process",
+            name: ContextMenuActionNames.EDIT_PROCESS,
             execute: (dispatch, resources) => {
                 dispatch<any>(openProcessUpdateDialog(resources[0]));
             },
         },
         {
             icon: ShareIcon,
-            name: "Share",
+            name: ContextMenuActionNames.SHARE,
             execute: (dispatch, resources) => {
                 dispatch<any>(openSharingDialog(resources[0].uuid));
             },
         },
         {
             icon: MoveToIcon,
-            name: "Move to",
+            name: ContextMenuActionNames.MOVE_TO,
             execute: (dispatch, resources) => {
                 dispatch<any>(openMoveProcessDialog(resources[0]));
             },
         },
         {
-            name: "Remove",
+            name: ContextMenuActionNames.REMOVE,
             icon: RemoveIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openRemoveProcessDialog(resources[0], resources.length));
@@ -120,7 +120,7 @@ export const processResourceActionSet: ContextMenuActionSet = [
 const runningProcessOnlyActionSet: ContextMenuActionSet = [
     [
         {
-            name: "CANCEL",
+            name: ContextMenuActionNames.CANCEL,
             icon: StopIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(cancelRunningWorkflow(resources[0].uuid));
@@ -134,7 +134,7 @@ export const processResourceAdminActionSet: ContextMenuActionSet = [
         ...processResourceActionSet.reduce((prev, next) => prev.concat(next), []),
         {
             component: TogglePublicFavoriteAction,
-            name: "Add to public favorites",
+            name: ContextMenuActionNames.ADD_TO_PUBLIC_FAVORITES,
             execute: (dispatch, resources) => {
                 dispatch<any>(togglePublicFavorite(resources[0])).then(() => {
                     dispatch<any>(publicFavoritePanelActions.REQUEST_ITEMS());
index f1c4643507c000c84539fb669c5447ee17ab63fe..1be6c8f13b3b398f26778c0f1fe91f8b5f9d8eb6 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from "../context-menu-action-set";
+import { ContextMenuActionSet, ContextMenuActionNames } from "../context-menu-action-set";
 import { NewProjectIcon, RenameIcon, MoveToIcon, DetailsIcon, AdvancedIcon, OpenIcon, Link, FolderSharedIcon } from "components/icon/icon";
 import { ToggleFavoriteAction } from "../actions/favorite-action";
 import { toggleFavorite } from "store/favorites/favorites-actions";
@@ -23,7 +23,7 @@ import { freezeProject, unfreezeProject } from "store/projects/project-lock-acti
 
 export const toggleFavoriteAction = {
     component: ToggleFavoriteAction,
-    name: "Add to Favorites",
+    name: ContextMenuActionNames.ADD_TO_FAVORITES,
     execute: (dispatch, resources) => {
         dispatch(toggleFavorite(resources[0])).then(() => {
             dispatch(favoritePanelActions.REQUEST_ITEMS());
@@ -33,7 +33,7 @@ export const toggleFavoriteAction = {
 
 export const openInNewTabMenuAction = {
     icon: OpenIcon,
-    name: "Open in new tab",
+    name: ContextMenuActionNames.OPEN_IN_NEW_TAB,
     execute: (dispatch, resources) => {
         dispatch(openInNewTabAction(resources[0]));
     },
@@ -41,7 +41,7 @@ export const openInNewTabMenuAction = {
 
 export const copyToClipboardMenuAction = {
     icon: Link,
-    name: "Copy to clipboard",
+    name: ContextMenuActionNames.COPY_TO_CLIPBOARD,
     execute: (dispatch, resources) => {
         dispatch(copyToClipboardAction(resources));
     },
@@ -49,7 +49,7 @@ export const copyToClipboardMenuAction = {
 
 export const viewDetailsAction = {
     icon: DetailsIcon,
-    name: "View details",
+    name: ContextMenuActionNames.VIEW_DETAILS,
     execute: dispatch => {
         dispatch(toggleDetailsPanel());
     },
@@ -57,7 +57,7 @@ export const viewDetailsAction = {
 
 export const advancedAction = {
     icon: AdvancedIcon,
-    name: "API Details",
+    name: ContextMenuActionNames.API_DETAILS,
     execute: (dispatch, resources) => {
         dispatch(openAdvancedTabDialog(resources[0].uuid));
     },
@@ -65,7 +65,7 @@ export const advancedAction = {
 
 export const openWith3rdPartyClientAction = {
     icon: FolderSharedIcon,
-    name: "Open with 3rd party client",
+    name: ContextMenuActionNames.OPEN_WITH_3RD_PARTY_CLIENT,
     execute: (dispatch, resources) => {
         dispatch(openWebDavS3InfoDialog(resources[0].uuid));
     },
@@ -73,7 +73,7 @@ export const openWith3rdPartyClientAction = {
 
 export const editProjectAction = {
     icon: RenameIcon,
-    name: "Edit project",
+    name: ContextMenuActionNames.EDIT_PROJECT,
     execute: (dispatch, resources) => {
         dispatch(openProjectUpdateDialog(resources[0]));
     },
@@ -81,7 +81,7 @@ export const editProjectAction = {
 
 export const shareAction = {
     icon: ShareIcon,
-    name: "Share",
+    name: ContextMenuActionNames.SHARE,
     execute: (dispatch, resources) => {
         dispatch(openSharingDialog(resources[0].uuid));
     },
@@ -89,7 +89,7 @@ export const shareAction = {
 
 export const moveToAction = {
     icon: MoveToIcon,
-    name: "Move to",
+    name: ContextMenuActionNames.MOVE_TO,
     execute: (dispatch, resource) => {
         dispatch(openMoveProjectDialog(resource[0]));
     },
@@ -97,7 +97,7 @@ export const moveToAction = {
 
 export const toggleTrashAction = {
     component: ToggleTrashAction,
-    name: "Move to trash",
+    name: ContextMenuActionNames.MOVE_TO_TRASH,
     execute: (dispatch, resources) => {
         dispatch(toggleProjectTrashed(resources[0].uuid, resources[0].ownerUuid, resources[0].isTrashed!!, resources.length > 1));
     },
@@ -105,7 +105,7 @@ export const toggleTrashAction = {
 
 export const freezeProjectAction = {
     component: ToggleLockAction,
-    name: "Freeze Project",
+    name: ContextMenuActionNames.FREEZE_PROJECT,
     execute: (dispatch, resources) => {
         if (resources[0].isFrozen) {
             dispatch(unfreezeProject(resources[0].uuid));
@@ -117,7 +117,7 @@ export const freezeProjectAction = {
 
 export const newProjectAction: any = {
     icon: NewProjectIcon,
-    name: "New project",
+    name: ContextMenuActionNames.NEW_PROJECT,
     execute: (dispatch, resources): void => {
         dispatch(openProjectCreateDialog(resources[0].uuid));
     },
index 53df7b370e7429e98822d0798a6f119dded4b614..937b43eb099bf7bd6a0f91f2733d2f5f3baef770 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from "../context-menu-action-set";
+import { ContextMenuActionSet, ContextMenuActionNames } from "../context-menu-action-set";
 import { TogglePublicFavoriteAction } from "views-components/context-menu/actions/public-favorite-action";
 import { togglePublicFavorite } from "store/public-favorites/public-favorites-actions";
 import { publicFavoritePanelActions } from "store/public-favorites-panel/public-favorites-action";
@@ -24,7 +24,7 @@ import {
 
 export const togglePublicFavoriteAction = {
     component: TogglePublicFavoriteAction,
-    name: "Add to public favorites",
+    name: ContextMenuActionNames.ADD_TO_PUBLIC_FAVORITES,
     execute: (dispatch, resources) => {
         dispatch(togglePublicFavorite(resources[0])).then(() => {
             dispatch(publicFavoritePanelActions.REQUEST_ITEMS());
index cbdcd004288780cbdbd3c5cfe2e41449d966fae5..20edbe4a88c1c7f7ea99dd328460630ba9cf0999 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from 'views-components/context-menu/context-menu-action-set';
 import { AdvancedIcon, RemoveIcon, ShareIcon, AttributesIcon } from 'components/icon/icon';
 import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
 import { openRepositoryAttributes, openRemoveRepositoryDialog } from 'store/repositories/repositories-actions';
@@ -11,28 +11,28 @@ import { openSharingDialog } from 'store/sharing-dialog/sharing-dialog-actions';
 export const repositoryActionSet: ContextMenuActionSet = [
     [
         {
-            name: 'Attributes',
+            name: ContextMenuActionNames.ATTRIBUTES,
             icon: AttributesIcon,
             execute: (dispatch, resources) => {
                  dispatch<any>(openRepositoryAttributes(resources[0].uuid));
             },
         },
         {
-            name: 'Share',
+            name: ContextMenuActionNames.SHARE,
             icon: ShareIcon,
             execute: (dispatch, resources) => {
                  dispatch<any>(openSharingDialog(resources[0].uuid));
             },
         },
         {
-            name: 'API Details',
+            name: ContextMenuActionNames.API_DETAILS,
             icon: AdvancedIcon,
             execute: (dispatch, resources) => {
                  dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
         },
         {
-            name: 'Remove',
+            name: ContextMenuActionNames.REMOVE,
             icon: RemoveIcon,
             execute: (dispatch, resources) => {
                  dispatch<any>(openRemoveRepositoryDialog(resources[0].uuid));
index 6c33b3ccd24485eb770bfe0b968b42f4d07072b3..6909df8427c4adb50f8aa3b097e675338f0797a4 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from '../context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from '../context-menu-action-set';
 import { ToggleFavoriteAction } from '../actions/favorite-action';
 import { toggleFavorite } from 'store/favorites/favorites-actions';
 
@@ -10,7 +10,7 @@ export const resourceActionSet: ContextMenuActionSet = [
     [
         {
             component: ToggleFavoriteAction,
-            name: 'Add to Favorites',
+            name: ContextMenuActionNames.ADD_TO_FAVORITES,
             execute: (dispatch, resources) => {
                 resources.forEach((resource) => dispatch<any>(toggleFavorite(resource)));
             },
index a779d1eb2967877c766d7166b63ae00697a4bfb4..8fcdbf0af30014ea8eabfcc3f233569182498058 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from '../context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from '../context-menu-action-set';
 import { openCollectionCreateDialog } from 'store/collections/collection-create-actions';
 import { NewProjectIcon, CollectionIcon } from 'components/icon/icon';
 import { openProjectCreateDialog } from 'store/projects/project-create-actions';
@@ -11,14 +11,14 @@ export const rootProjectActionSet: ContextMenuActionSet = [
     [
         {
             icon: NewProjectIcon,
-            name: 'New project',
+            name: ContextMenuActionNames.NEW_PROJECT,
             execute: (dispatch, resources) => {
                  dispatch<any>(openProjectCreateDialog(resources[0].uuid));
             },
         },
         {
             icon: CollectionIcon,
-            name: 'New Collection',
+            name: ContextMenuActionNames.NEW_COLLECTION,
             execute: (dispatch, resources) => {
                  dispatch<any>(openCollectionCreateDialog(resources[0].uuid));
             },
index dcc9eae20700160c3fdd3bf72224754b9bdded81..54315d587714f13c8a4c6834e4b401cc499a97a0 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from '../context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from '../context-menu-action-set';
 import { DetailsIcon, AdvancedIcon, OpenIcon, Link } from 'components/icon/icon';
 import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
 import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
@@ -12,28 +12,28 @@ export const searchResultsActionSet: ContextMenuActionSet = [
     [
         {
             icon: OpenIcon,
-            name: 'Open in new tab',
+            name: ContextMenuActionNames.OPEN_IN_NEW_TAB,
             execute: (dispatch, resources) => {
                 resources.forEach((resource) => dispatch<any>(openInNewTabAction(resource)));
             },
         },
         {
             icon: Link,
-            name: 'Copy to clipboard',
+            name: ContextMenuActionNames.COPY_TO_CLIPBOARD,
             execute: (dispatch, resources) => {
                 dispatch<any>(copyToClipboardAction(resources));
             },
         },
         {
             icon: DetailsIcon,
-            name: 'View details',
+            name: ContextMenuActionNames.VIEW_DETAILS,
             execute: (dispatch) => {
                 dispatch<any>(toggleDetailsPanel());
             },
         },
         {
             icon: AdvancedIcon,
-            name: 'API Details',
+            name: ContextMenuActionNames.API_DETAILS,
             execute: (dispatch, resources) => {
                 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
index c31e1681a4f88bd861c12ae6158837db982ccdbb..2a64f17cd2b5e3afa1c36524ec86afface69afe4 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from 'views-components/context-menu/context-menu-action-set';
 import { AdvancedIcon, RemoveIcon, AttributesIcon } from 'components/icon/icon';
 import { openSshKeyRemoveDialog, openSshKeyAttributesDialog } from 'store/auth/auth-action-ssh';
 import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
@@ -10,21 +10,21 @@ import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
 export const sshKeyActionSet: ContextMenuActionSet = [
     [
         {
-            name: 'Attributes',
+            name: ContextMenuActionNames.ATTRIBUTES,
             icon: AttributesIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openSshKeyAttributesDialog(resources[0].uuid));
             },
         },
         {
-            name: 'API Details',
+            name: ContextMenuActionNames.API_DETAILS,
             icon: AdvancedIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
         },
         {
-            name: 'Remove',
+            name: ContextMenuActionNames.REMOVE,
             icon: RemoveIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openSshKeyRemoveDialog(resources[0].uuid));
index dfcb4f6c954cf0edb663580bece78f18445a2a11..8a2790456938eba6e699cc486c17977e1af7529f 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from '../context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from '../context-menu-action-set';
 import { ToggleTrashAction } from 'views-components/context-menu/actions/trash-action';
 import { toggleTrashed } from 'store/trash/trash-actions';
 
@@ -10,7 +10,7 @@ export const trashActionSet: ContextMenuActionSet = [
     [
         {
             component: ToggleTrashAction,
-            name: 'Move to Trash',
+            name: ContextMenuActionNames.MOVE_TO_TRASH,
             execute: (dispatch, resources) => {
                 resources.forEach((resource) => dispatch<any>(toggleTrashed(resource.kind, resource.uuid, resource.ownerUuid, resource.isTrashed!!)));
             },
index 3e8f0cb647e38e8f73b35e33faf562ccc9caa155..ea66deb683e458739da10b2a7870000ed649a994 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from '../context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from '../context-menu-action-set';
 import { DetailsIcon, ProvenanceGraphIcon, AdvancedIcon, RestoreFromTrashIcon } from 'components/icon/icon';
 import { toggleCollectionTrashed } from 'store/trash/trash-actions';
 import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
@@ -12,28 +12,28 @@ export const trashedCollectionActionSet: ContextMenuActionSet = [
     [
         {
             icon: DetailsIcon,
-            name: 'View details',
+            name: ContextMenuActionNames.VIEW_DETAILS,
             execute: (dispatch) => {
                 dispatch<any>(toggleDetailsPanel());
             },
         },
         {
             icon: ProvenanceGraphIcon,
-            name: 'Provenance graph',
+            name: ContextMenuActionNames.PROVENANCE_GRAPH,
             execute: (dispatch, resource) => {
                 // add code
             },
         },
         {
             icon: AdvancedIcon,
-            name: 'API Details',
+            name: ContextMenuActionNames.API_DETAILS,
             execute: (dispatch, resources) => {
                 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
         },
         {
             icon: RestoreFromTrashIcon,
-            name: 'Restore',
+            name: ContextMenuActionNames.RESTORE,
             execute: (dispatch, resources) => {
                 resources.forEach((resource) => dispatch<any>(toggleCollectionTrashed(resource.uuid, true)));
             },
index 0108ff7e50ec1a3cf164ba77019449b1039a0fb2..953ed6e9c98bfce74885aa73e24f85b4b4672eb4 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from 'views-components/context-menu/context-menu-action-set';
 import {
     AdvancedIcon,
     ProjectIcon,
@@ -29,28 +29,28 @@ import {
 export const userActionSet: ContextMenuActionSet = [
     [
         {
-            name: 'Attributes',
+            name: ContextMenuActionNames.ATTRIBUTES,
             icon: AttributesIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openUserAttributes(resources[0].uuid));
             },
         },
         {
-            name: 'Project',
+            name: ContextMenuActionNames.HOME_PROJECT,
             icon: ProjectIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openUserProjects(resources[0].uuid));
             },
         },
         {
-            name: 'API Details',
+            name: ContextMenuActionNames.API_DETAILS,
             icon: AdvancedIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
         },
         {
-            name: 'Account Settings',
+            name: ContextMenuActionNames.ACCOUNT_SETTINGS,
             icon: UserPanelIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(navigateToUserProfile(resources[0].uuid));
@@ -60,7 +60,7 @@ export const userActionSet: ContextMenuActionSet = [
     ],
     [
         {
-            name: 'Activate User',
+            name: ContextMenuActionNames.ACTIVATE_USER,
             icon: ActiveIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openActivateDialog(resources[0].uuid));
@@ -68,7 +68,7 @@ export const userActionSet: ContextMenuActionSet = [
             filters: [isAdmin, canActivateUser],
         },
         {
-            name: 'Setup User',
+            name: ContextMenuActionNames.SETUP_USER,
             icon: AdminMenuIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openSetupDialog(resources[0].uuid));
@@ -76,7 +76,7 @@ export const userActionSet: ContextMenuActionSet = [
             filters: [isAdmin, canSetupUser],
         },
         {
-            name: 'Deactivate User',
+            name: ContextMenuActionNames.DEACTIVATE_USER,
             icon: DeactivateUserIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openDeactivateDialog(resources[0].uuid));
@@ -84,7 +84,7 @@ export const userActionSet: ContextMenuActionSet = [
             filters: [isAdmin, canDeactivateUser],
         },
         {
-            name: 'Login As User',
+            name: ContextMenuActionNames.LOGIN_AS_USER,
             icon: LoginAsIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(loginAs(resources[0].uuid));
index a26cbe1368d4aa0c8b435af7db26f65b8c138b19..11d94ccc1d8036ea6dedf020f77dcac51e6e943c 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set';
+import { ContextMenuActionSet, ContextMenuActionNames } from 'views-components/context-menu/context-menu-action-set';
 import { AdvancedIcon, RemoveIcon, AttributesIcon } from 'components/icon/icon';
 import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
 import { openVirtualMachineAttributes, openRemoveVirtualMachineDialog } from 'store/virtual-machines/virtual-machines-actions';
@@ -10,21 +10,21 @@ import { openVirtualMachineAttributes, openRemoveVirtualMachineDialog } from 'st
 export const virtualMachineActionSet: ContextMenuActionSet = [
     [
         {
-            name: 'Attributes',
+            name: ContextMenuActionNames.ATTRIBUTES,
             icon: AttributesIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openVirtualMachineAttributes(resources[0].uuid));
             },
         },
         {
-            name: 'API Details',
+            name: ContextMenuActionNames.API_DETAILS,
             icon: AdvancedIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
         },
         {
-            name: 'Remove',
+            name: ContextMenuActionNames.REMOVE,
             icon: RemoveIcon,
             execute: (dispatch, resources) => {
                 dispatch<any>(openRemoveVirtualMachineDialog(resources[0].uuid));
index 4a1460bfc94f81552283595f7d31ffd08d97517a..e0787f94ee8d808e4ea487554871560684cd5b2e 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
+import { ContextMenuActionSet, ContextMenuActionNames } from "views-components/context-menu/context-menu-action-set";
 import { openRunProcess, deleteWorkflow } from "store/workflow-panel/workflow-panel-actions";
 import { DetailsIcon, AdvancedIcon, OpenIcon, Link, StartIcon, TrashIcon } from "components/icon/icon";
 import { copyToClipboardAction, openInNewTabAction } from "store/open-in-new-tab/open-in-new-tab.actions";
@@ -13,35 +13,35 @@ export const readOnlyWorkflowActionSet: ContextMenuActionSet = [
     [
         {
             icon: OpenIcon,
-            name: "Open in new tab",
+            name: ContextMenuActionNames.OPEN_IN_NEW_TAB,
             execute: (dispatch, resources) => {
                 dispatch<any>(openInNewTabAction(resources[0]));
             },
         },
         {
             icon: Link,
-            name: "Copy to clipboard",
+            name: ContextMenuActionNames.COPY_TO_CLIPBOARD,
             execute: (dispatch, resources) => {
                 dispatch<any>(copyToClipboardAction(resources));
             },
         },
         {
             icon: DetailsIcon,
-            name: "View details",
+            name: ContextMenuActionNames.VIEW_DETAILS,
             execute: dispatch => {
                 dispatch<any>(toggleDetailsPanel());
             },
         },
         {
             icon: AdvancedIcon,
-            name: "API Details",
+            name: ContextMenuActionNames.API_DETAILS,
             execute: (dispatch, resources) => {
                 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
         },
         {
             icon: StartIcon,
-            name: "Run Workflow",
+            name: ContextMenuActionNames.RUN_WORKFLOW,
             execute: (dispatch, resources) => {
                 dispatch<any>(openRunProcess(resources[0].uuid, resources[0].ownerUuid, resources[0].name));
             },
@@ -54,7 +54,7 @@ export const workflowActionSet: ContextMenuActionSet = [
         ...readOnlyWorkflowActionSet[0],
         {
             icon: TrashIcon,
-            name: "Delete Workflow",
+            name: ContextMenuActionNames.DELETE_WORKFLOW,
             execute: (dispatch, resources) => {
                 dispatch<any>(deleteWorkflow(resources[0].uuid, resources[0].ownerUuid));
             },
index 3bda751aaf4cf63c7aba7e1ae3608167fcce8038..4468ba252123ce5aa30be2b8e6b933c28824ef2d 100644 (file)
@@ -9,7 +9,7 @@ import { ContextMenuResource } from "store/context-menu/context-menu-actions";
 export enum ContextMenuActionNames {
     ACCOUNT_SETTINGS = 'Account settings',
     ACTIVATE_USER = 'Activate user',
-    ADD_TO_FAVORITES = 'Add to Favorites',
+    ADD_TO_FAVORITES = 'Add to favorites',
     ADD_TO_PUBLIC_FAVORITES = 'Add to public favorites',
     ATTRIBUTES = 'Attributes',
     API_DETAILS = 'API Details',
@@ -27,7 +27,8 @@ export enum ContextMenuActionNames {
     EDIT_COLLECTION = 'Edit collection',
     EDIT_PROCESS = 'Edit process',
     EDIT_PROJECT = 'Edit project',
-    FREEZE_PROJECT = 'Freeze Project',
+    FREEZE_PROJECT = 'Freeze project',
+    HOME_PROJECT = 'Home project',
     LOGIN_AS_USER = 'Login as user',
     MAKE_A_COPY = 'Make a copy',
     MANAGE = 'Manage',
@@ -38,16 +39,17 @@ export enum ContextMenuActionNames {
     MOVE_SELECTED_INTO_SEPARATE_COLLECTIONS = 'Move selected into separate collections',
     MOVE_TO = 'Move to',
     MOVE_TO_TRASH = 'Move to trash',
-    NEW_COLLECTION = 'New Collection',
+    NEW_COLLECTION = 'New collection',
     NEW_PROJECT = 'New project',
     OPEN_IN_NEW_TAB = 'Open in new tab',
-    OPEN_W_3RD_PARTY_CLIENT = 'Open with 3rd party client',
+    OPEN_WITH_3RD_PARTY_CLIENT = 'Open with 3rd party client',
     OUTPUTS = 'Outputs',
     PROVENANCE_GRAPH = 'Provenance graph',
     READ = 'Read',
     REMOVE = 'Remove',
     REMOVE_SELECTED = 'Remove selected',
     RENAME = 'Rename',
+    RESTORE = 'Restore',
     RESTORE_VERSION = 'Restore version',
     RUN_WORKFLOW = 'Run Workflow',
     SELECT_ALL = 'Select all',
index a8a8f45748276dfd6a4578d6c54de7534c0ba13b..760260892c43edc8875a27964f764694cd5f26ab 100644 (file)
@@ -14,7 +14,7 @@ import { openCollectionUpdateDialog } from "store/collections/collection-update-
 import { copyToClipboardAction } from "store/open-in-new-tab/open-in-new-tab.actions";
 import { openWebDavS3InfoDialog } from "store/collections/collection-info-actions";
 
-const { MAKE_A_COPY, MOVE_TO, MOVE_TO_TRASH, EDIT_COLLECTION, OPEN_IN_NEW_TAB, OPEN_W_3RD_PARTY_CLIENT, COPY_TO_CLIPBOARD, VIEW_DETAILS, API_DETAILS, ADD_TO_FAVORITES, SHARE} = MultiSelectMenuActionNames;
+const { MAKE_A_COPY, MOVE_TO, MOVE_TO_TRASH, EDIT_COLLECTION, OPEN_IN_NEW_TAB, OPEN_WITH_3RD_PARTY_CLIENT, COPY_TO_CLIPBOARD, VIEW_DETAILS, API_DETAILS, ADD_TO_FAVORITES, SHARE} = MultiSelectMenuActionNames;
 
 const msCopyCollection: MultiSelectMenuAction = {
     name: MAKE_A_COPY,
@@ -68,7 +68,7 @@ const msCopyToClipboardMenuAction: MultiSelectMenuAction  = {
 };
 
 const msOpenWith3rdPartyClientAction: MultiSelectMenuAction  = {
-    name: OPEN_W_3RD_PARTY_CLIENT,
+    name: OPEN_WITH_3RD_PARTY_CLIENT,
     icon: FolderSharedIcon,
     hasAlts: false,
     isForMulti: false,
@@ -89,6 +89,6 @@ export const msCollectionActionSet: MultiSelectMenuActionSet = [
     ],
 ];
 
-export const msReadOnlyCollectionActionFilter = new Set([OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, MAKE_A_COPY, VIEW_DETAILS, API_DETAILS, ADD_TO_FAVORITES, OPEN_W_3RD_PARTY_CLIENT]);
-export const msCommonCollectionActionFilter = new Set([OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, MAKE_A_COPY, VIEW_DETAILS, API_DETAILS, OPEN_W_3RD_PARTY_CLIENT, EDIT_COLLECTION, SHARE, MOVE_TO, ADD_TO_FAVORITES, MOVE_TO_TRASH])
-export const msOldCollectionActionFilter = new Set([OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, MAKE_A_COPY, VIEW_DETAILS, API_DETAILS, OPEN_W_3RD_PARTY_CLIENT, EDIT_COLLECTION, SHARE, MOVE_TO, ADD_TO_FAVORITES, MOVE_TO_TRASH])
\ No newline at end of file
+export const msReadOnlyCollectionActionFilter = new Set([OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, MAKE_A_COPY, VIEW_DETAILS, API_DETAILS, ADD_TO_FAVORITES, OPEN_WITH_3RD_PARTY_CLIENT]);
+export const msCommonCollectionActionFilter = new Set([OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, MAKE_A_COPY, VIEW_DETAILS, API_DETAILS, OPEN_WITH_3RD_PARTY_CLIENT, EDIT_COLLECTION, SHARE, MOVE_TO, ADD_TO_FAVORITES, MOVE_TO_TRASH])
+export const msOldCollectionActionFilter = new Set([OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, MAKE_A_COPY, VIEW_DETAILS, API_DETAILS, OPEN_WITH_3RD_PARTY_CLIENT, EDIT_COLLECTION, SHARE, MOVE_TO, ADD_TO_FAVORITES, MOVE_TO_TRASH])
\ No newline at end of file
index 91e96d9bfbe002304616782d120f8239850150a4..2facdcd4ce995327e40946673bc9ba4ce9468276 100644 (file)
@@ -36,7 +36,7 @@ export enum MultiSelectMenuActionNames {
     MOVE_TO = 'Move to',
     NEW_PROJECT = 'New project',
     OPEN_IN_NEW_TAB = 'Open in new tab',
-    OPEN_W_3RD_PARTY_CLIENT = 'Open with 3rd party client',
+    OPEN_WITH_3RD_PARTY_CLIENT = 'Open with 3rd party client',
     OUTPUTS = 'Outputs',
     REMOVE = 'Remove',
     RUN_WORKFLOW = 'Run Workflow',
index ee1ea1d1792911ad850791caba0789122441d5fd..c7a47aba5ac819f98cd8eea78af856dd1062aa2e 100644 (file)
@@ -28,7 +28,7 @@ const {
     COPY_TO_CLIPBOARD,
     VIEW_DETAILS,
     API_DETAILS,
-    OPEN_W_3RD_PARTY_CLIENT,
+    OPEN_WITH_3RD_PARTY_CLIENT,
     EDIT_PROJECT,
     SHARE,
     MOVE_TO,
@@ -68,7 +68,7 @@ const msMoveToAction: MultiSelectMenuAction = {
 };
 
 const msOpenWith3rdPartyClientAction: MultiSelectMenuAction  = {
-    name: OPEN_W_3RD_PARTY_CLIENT,
+    name: OPEN_WITH_3RD_PARTY_CLIENT,
     icon: FolderSharedIcon,
     hasAlts: false,
     isForMulti: false,
@@ -146,13 +146,13 @@ export const msCommonProjectActionFilter = new Set<string>([
     MOVE_TO,
     NEW_PROJECT,
     OPEN_IN_NEW_TAB,
-    OPEN_W_3RD_PARTY_CLIENT,
+    OPEN_WITH_3RD_PARTY_CLIENT,
     SHARE,
     VIEW_DETAILS,
 ]);
-export const msReadOnlyProjectActionFilter = new Set<string>([ADD_TO_FAVORITES, API_DETAILS, COPY_TO_CLIPBOARD, OPEN_IN_NEW_TAB, OPEN_W_3RD_PARTY_CLIENT, VIEW_DETAILS,]);
-export const msFrozenProjectActionFilter = new Set<string>([ADD_TO_FAVORITES, API_DETAILS, COPY_TO_CLIPBOARD, OPEN_IN_NEW_TAB, OPEN_W_3RD_PARTY_CLIENT, VIEW_DETAILS, SHARE, FREEZE_PROJECT])
-export const msAdminFrozenProjectActionFilter = new Set<string>([ADD_TO_FAVORITES, API_DETAILS, COPY_TO_CLIPBOARD, OPEN_IN_NEW_TAB, OPEN_W_3RD_PARTY_CLIENT, VIEW_DETAILS, SHARE, FREEZE_PROJECT, ADD_TO_PUBLIC_FAVORITES])
+export const msReadOnlyProjectActionFilter = new Set<string>([ADD_TO_FAVORITES, API_DETAILS, COPY_TO_CLIPBOARD, OPEN_IN_NEW_TAB, OPEN_WITH_3RD_PARTY_CLIENT, VIEW_DETAILS,]);
+export const msFrozenProjectActionFilter = new Set<string>([ADD_TO_FAVORITES, API_DETAILS, COPY_TO_CLIPBOARD, OPEN_IN_NEW_TAB, OPEN_WITH_3RD_PARTY_CLIENT, VIEW_DETAILS, SHARE, FREEZE_PROJECT])
+export const msAdminFrozenProjectActionFilter = new Set<string>([ADD_TO_FAVORITES, API_DETAILS, COPY_TO_CLIPBOARD, OPEN_IN_NEW_TAB, OPEN_WITH_3RD_PARTY_CLIENT, VIEW_DETAILS, SHARE, FREEZE_PROJECT, ADD_TO_PUBLIC_FAVORITES])
 
-export const msFilterGroupActionFilter = new Set<string>([ADD_TO_FAVORITES, API_DETAILS, COPY_TO_CLIPBOARD, OPEN_IN_NEW_TAB, OPEN_W_3RD_PARTY_CLIENT, VIEW_DETAILS, SHARE, MOVE_TO_TRASH, EDIT_PROJECT, MOVE_TO])
-export const msAdminFilterGroupActionFilter = new Set<string>([ADD_TO_FAVORITES, API_DETAILS, COPY_TO_CLIPBOARD, OPEN_IN_NEW_TAB, OPEN_W_3RD_PARTY_CLIENT, VIEW_DETAILS, SHARE, MOVE_TO_TRASH, EDIT_PROJECT, MOVE_TO, ADD_TO_PUBLIC_FAVORITES])
\ No newline at end of file
+export const msFilterGroupActionFilter = new Set<string>([ADD_TO_FAVORITES, API_DETAILS, COPY_TO_CLIPBOARD, OPEN_IN_NEW_TAB, OPEN_WITH_3RD_PARTY_CLIENT, VIEW_DETAILS, SHARE, MOVE_TO_TRASH, EDIT_PROJECT, MOVE_TO])
+export const msAdminFilterGroupActionFilter = new Set<string>([ADD_TO_FAVORITES, API_DETAILS, COPY_TO_CLIPBOARD, OPEN_IN_NEW_TAB, OPEN_WITH_3RD_PARTY_CLIENT, VIEW_DETAILS, SHARE, MOVE_TO_TRASH, EDIT_PROJECT, MOVE_TO, ADD_TO_PUBLIC_FAVORITES])
\ No newline at end of file