[arvados-workbench2] updated: 2.6.0-101-gc1b5417d

git repository hosting git at public.arvados.org
Sun Sep 17 21:07:11 UTC 2023


Summary of changes:
 src/store/collections/collection-copy-actions.ts   |  2 ++
 .../open-in-new-tab/open-in-new-tab.actions.ts     |  6 ++---
 src/store/workbench/workbench-actions.ts           |  6 ++++-
 .../api-client-authorization-action-set.ts         | 26 +++++++++++++---------
 .../action-sets/collection-action-set.ts           | 21 +++++++++--------
 .../ms-collection-action-set.ts                    |  3 ++-
 6 files changed, 38 insertions(+), 26 deletions(-)

       via  c1b5417d1036da83283b7c84ff7cae5c553ada27 (commit)
      from  182ef83a9e654c313383008778372f02d3f0e4f1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit c1b5417d1036da83283b7c84ff7cae5c553ada27
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Sun Sep 17 17:07:07 2023 -0400

    15768: fixed dialog not closing on single collection copy Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/src/store/collections/collection-copy-actions.ts b/src/store/collections/collection-copy-actions.ts
index d4e647f8..e454712a 100644
--- a/src/store/collections/collection-copy-actions.ts
+++ b/src/store/collections/collection-copy-actions.ts
@@ -19,6 +19,7 @@ export const COLLECTION_COPY_FORM_NAME = "collectionCopyFormName";
 export const COLLECTION_MULTI_COPY_FORM_NAME = "collectionMultiCopyFormName";
 
 export const openCollectionCopyDialog = (resource: { name: string; uuid: string; isSingle?: boolean }) => (dispatch: Dispatch) => {
+    console.log(resource);
     dispatch<any>(resetPickerProjectTree());
     dispatch<any>(initProjectsTreePicker(COLLECTION_COPY_FORM_NAME));
     const initialData: CopyFormDialogData = { name: `Copy of: ${resource.name}`, ownerUuid: "", uuid: resource.uuid, isSingle: resource.isSingle };
@@ -36,6 +37,7 @@ export const openMultiCollectionCopyDialog = (resource: { name: string; uuid: st
 
 export const copyCollection =
     (resource: CopyFormDialogData) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+        console.log("COPYCOLL", resource);
         const formName = resource.isSingle ? COLLECTION_COPY_FORM_NAME : COLLECTION_MULTI_COPY_FORM_NAME;
         dispatch(startSubmit(formName));
         let collection = getResource<CollectionResource>(resource.uuid)(getState().resources);
diff --git a/src/store/open-in-new-tab/open-in-new-tab.actions.ts b/src/store/open-in-new-tab/open-in-new-tab.actions.ts
index 6a1ec643..7c6c2bb3 100644
--- a/src/store/open-in-new-tab/open-in-new-tab.actions.ts
+++ b/src/store/open-in-new-tab/open-in-new-tab.actions.ts
@@ -23,11 +23,11 @@ export const copyToClipboardAction = (resources: Array<any>) => (dispatch: Dispa
 
     let output = "";
 
-    resources.forEach(resource => {
+    for (const resource of [...resources]) {
         let url = getNavUrl(resource.uuid, getState().auth, false);
         if (url[0] === "/") url = `${window.location.origin}${url}`;
-        output += output.length ? `, ${url}` : url;
-    });
+        output += output.length ? `,${url}` : url;
+    }
 
     if (output.length) {
         const wasCopied = copy(output);
diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts
index 3d580915..95db8c4f 100644
--- a/src/store/workbench/workbench-actions.ts
+++ b/src/store/workbench/workbench-actions.ts
@@ -444,7 +444,11 @@ export const copyCollection = (data: CopyFormDialogData) => async (dispatch: Dis
         const newName = data.isSingle ? data.name : `Copy of: ${copyToProject.name}`;
         try {
             const collection = await dispatch<any>(
-                collectionCopyActions.copyCollection({ ...copyToProject, name: newName, isSingle: data.isSingle })
+                collectionCopyActions.copyCollection({
+                    ...copyToProject,
+                    name: newName,
+                    isSingle: collectionsToCopy.length === 1 ? true : data.isSingle,
+                })
             );
             if (copyToProject && collection) {
                 await dispatch<any>(reloadProjectMatchingUuid([copyToProject.uuid]));
diff --git a/src/views-components/context-menu/action-sets/api-client-authorization-action-set.ts b/src/views-components/context-menu/action-sets/api-client-authorization-action-set.ts
index 001bae4f..0d3bebb1 100644
--- a/src/views-components/context-menu/action-sets/api-client-authorization-action-set.ts
+++ b/src/views-components/context-menu/action-sets/api-client-authorization-action-set.ts
@@ -5,32 +5,38 @@
 import {
     openApiClientAuthorizationAttributesDialog,
     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 { AdvancedIcon, RemoveIcon, AttributesIcon } from 'components/icon/icon';
+} 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 { AdvancedIcon, RemoveIcon, AttributesIcon } from "components/icon/icon";
 
 export const apiClientAuthorizationActionSet: ContextMenuActionSet = [
     [
         {
-            name: 'Attributes',
+            name: "Attributes",
             icon: AttributesIcon,
             execute: (dispatch, resources) => {
-                resources.forEach(({ uuid }) => dispatch<any>(openApiClientAuthorizationAttributesDialog(uuid)));
+                for (const resource of [...resources]) {
+                    dispatch<any>(openApiClientAuthorizationAttributesDialog(resource.uuid));
+                }
             },
         },
         {
-            name: 'API Details',
+            name: "API Details",
             icon: AdvancedIcon,
             execute: (dispatch, resources) => {
-                resources.forEach(({ uuid }) => dispatch<any>(openAdvancedTabDialog(uuid)));
+                for (const resource of [...resources]) {
+                    dispatch<any>(openAdvancedTabDialog(resource.uuid));
+                }
             },
         },
         {
-            name: 'Remove',
+            name: "Remove",
             icon: RemoveIcon,
             execute: (dispatch, resources) => {
-                resources.forEach(({ uuid }) => dispatch<any>(openApiClientAuthorizationRemoveDialog(uuid)));
+                for (const resource of [...resources]) {
+                    dispatch<any>(openApiClientAuthorizationRemoveDialog(resource.uuid));
+                }
             },
         },
     ],
diff --git a/src/views-components/context-menu/action-sets/collection-action-set.ts b/src/views-components/context-menu/action-sets/collection-action-set.ts
index 86c850f0..e7a34ec3 100644
--- a/src/views-components/context-menu/action-sets/collection-action-set.ts
+++ b/src/views-components/context-menu/action-sets/collection-action-set.ts
@@ -38,14 +38,13 @@ const toggleFavoriteAction: ContextMenuAction = {
     component: ToggleFavoriteAction,
     name: "ToggleFavoriteAction",
     execute: (dispatch, resources) => {
-        resources.forEach(resource =>
+        for (const resource of [...resources]) {
             dispatch<any>(toggleFavorite(resource)).then(() => {
                 dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
-            })
-        );
+            });
+        }
     },
 };
-
 const commonActionSet: ContextMenuActionSet = [
     [
         {
@@ -81,7 +80,7 @@ const commonActionSet: ContextMenuActionSet = [
             icon: AdvancedIcon,
             name: "API Details",
             execute: (dispatch, resources) => {
-                resources.forEach(resource => dispatch<any>(openAdvancedTabDialog(resource.uuid)));
+                dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
             },
         },
     ],
@@ -95,7 +94,7 @@ export const readOnlyCollectionActionSet: ContextMenuActionSet = [
             icon: FolderSharedIcon,
             name: "Open with 3rd party client",
             execute: (dispatch, resources) => {
-                resources.forEach(resource => dispatch<any>(openWebDavS3InfoDialog(resource.uuid)));
+                dispatch<any>(openWebDavS3InfoDialog(resources[0].uuid));
             },
         },
     ],
@@ -108,14 +107,14 @@ export const collectionActionSet: ContextMenuActionSet = [
             icon: RenameIcon,
             name: "Edit collection",
             execute: (dispatch, resources) => {
-                resources.forEach(resource => dispatch<any>(openCollectionUpdateDialog(resource)));
+                dispatch<any>(openCollectionUpdateDialog(resources[0]));
             },
         },
         {
             icon: ShareIcon,
             name: "Share",
             execute: (dispatch, resources) => {
-                resources.forEach(({ uuid }) => dispatch<any>(openSharingDialog(uuid)));
+                dispatch<any>(openSharingDialog(resources[0].uuid));
             },
         },
         {
@@ -142,11 +141,11 @@ export const collectionAdminActionSet: ContextMenuActionSet = [
             component: TogglePublicFavoriteAction,
             name: "TogglePublicFavoriteAction",
             execute: (dispatch, resources) => {
-                resources.forEach(resource =>
+                for (const resource of resources) {
                     dispatch<any>(togglePublicFavorite(resource)).then(() => {
                         dispatch<any>(publicFavoritePanelActions.REQUEST_ITEMS());
-                    })
-                );
+                    });
+                }
             },
         },
     ],
diff --git a/src/views-components/multiselect-toolbar/ms-collection-action-set.ts b/src/views-components/multiselect-toolbar/ms-collection-action-set.ts
index f6d7e712..77215470 100644
--- a/src/views-components/multiselect-toolbar/ms-collection-action-set.ts
+++ b/src/views-components/multiselect-toolbar/ms-collection-action-set.ts
@@ -15,7 +15,8 @@ export const msCollectionActionSet: ContextMenuActionSet = [
         {
             icon: CopyIcon,
             name: "Make a copy",
-            execute: (dispatch, resources) => {
+            execute: (dispatch, [...resources]) => {
+                console.log(resources);
                 if (resources[0].isSingle || resources.length === 1) dispatch<any>(openCollectionCopyDialog(resources[0]));
                 else dispatch<any>(openMultiCollectionCopyDialog(resources[0]));
             },

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list