[ARVADOS-WORKBENCH2] updated: 1.1.4-682-g96e19f5

Git user git at public.curoverse.com
Mon Aug 20 07:27:55 EDT 2018


Summary of changes:
 .../collection-panel-files/collection-panel-files-actions.ts     | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

       via  96e19f561cb0b3936e19c7659a7481615d0773d4 (commit)
      from  45d9b3d7298daf82bfb93c82e4f2f8c125c45e79 (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 96e19f561cb0b3936e19c7659a7481615d0773d4
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Mon Aug 20 13:27:28 2018 +0200

    Handle collection partial copy errors
    
    Feature #14014
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts b/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
index f2dc551..e7a7ec8 100644
--- a/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
+++ b/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
@@ -129,8 +129,15 @@ export const doCollectionPartialCopy = ({ name, description, projectUuid }: Coll
                 dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY }));
                 dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'New collection created.', hideDuration: 2000 }));
             } catch (e) {
-                if (getCommonResourceServiceError(e) === CommonResourceServiceError.UNIQUE_VIOLATION) {
+                const error = getCommonResourceServiceError(e);
+                if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
                     dispatch(stopSubmit(COLLECTION_PARTIAL_COPY, { name: 'Collection with this name already exists.' }));
+                } else if (error === CommonResourceServiceError.UNKNOWN) {
+                    dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY }));
+                    dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Could not create a copy of collection', hideDuration: 2000 }));
+                } else {
+                    dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY }));
+                    dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Collection has been copied but may contain incorrect files.', hideDuration: 2000 }));
                 }
             }
         }

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list