[ARVADOS-WORKBENCH2] updated: 1.2.0-134-g47eb02a
Git user
git at public.curoverse.com
Fri Aug 24 04:12:57 EDT 2018
Summary of changes:
src/store/collections/collection-copy-actions.ts | 14 +++++++-------
.../dialog-forms/copy-collection-dialog.ts | 6 +++---
2 files changed, 10 insertions(+), 10 deletions(-)
via 47eb02af0c2c7bc4f0f852400308033c72322af8 (commit)
from 0cdeff59eefbd738d3bd87e2e666915b1e715715 (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 47eb02af0c2c7bc4f0f852400308033c72322af8
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date: Fri Aug 24 10:12:41 2018 +0200
cr changes
Feature #13897
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
diff --git a/src/store/collections/collection-copy-actions.ts b/src/store/collections/collection-copy-actions.ts
index d0d3f39..4038c71 100644
--- a/src/store/collections/collection-copy-actions.ts
+++ b/src/store/collections/collection-copy-actions.ts
@@ -12,7 +12,7 @@ import { getCommonResourceServiceError, CommonResourceServiceError } from '~/com
import { snackbarActions } from '~/store/snackbar/snackbar-actions';
import { projectPanelActions } from '~/store/project-panel/project-panel-action';
-export const COLLECTION_COPY_DIALOG = 'projectCopy';
+export const COLLECTION_COPY_FORM_NAME = 'projectCopy';
export interface CollectionCopyFormDialogData {
name: string;
@@ -24,27 +24,27 @@ export const openCollectionCopyDialog = (resource: { name: string, uuid: string
(dispatch: Dispatch) => {
dispatch<any>(resetPickerProjectTree());
const initialData: CollectionCopyFormDialogData = { name: `Copy of: ${resource.name}`, ownerUuid: '', uuid: resource.uuid };
- dispatch<any>(initialize(COLLECTION_COPY_DIALOG, initialData));
- dispatch(dialogActions.OPEN_DIALOG({ id: COLLECTION_COPY_DIALOG, data: {} }));
+ dispatch<any>(initialize(COLLECTION_COPY_FORM_NAME, initialData));
+ dispatch(dialogActions.OPEN_DIALOG({ id: COLLECTION_COPY_FORM_NAME, data: {} }));
};
export const copyCollection = (resource: CollectionCopyFormDialogData) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
- dispatch(startSubmit(COLLECTION_COPY_DIALOG));
+ dispatch(startSubmit(COLLECTION_COPY_FORM_NAME));
try {
const collection = await services.collectionService.get(resource.uuid);
const uuidKey = 'uuid';
delete collection[uuidKey];
await services.collectionService.create({ ...collection, ownerUuid: resource.ownerUuid, name: resource.name });
dispatch(projectPanelActions.REQUEST_ITEMS());
- dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_COPY_DIALOG }));
+ dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_COPY_FORM_NAME }));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Collection has been copied', hideDuration: 2000 }));
} catch (e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(COLLECTION_COPY_DIALOG, { ownerUuid: 'A collection with the same name already exists in the target project.' }));
+ dispatch(stopSubmit(COLLECTION_COPY_FORM_NAME, { ownerUuid: 'A collection with the same name already exists in the target project.' }));
} else {
- dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_COPY_DIALOG }));
+ dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_COPY_FORM_NAME }));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Could not copy the collection', hideDuration: 2000 }));
}
}
diff --git a/src/views-components/dialog-forms/copy-collection-dialog.ts b/src/views-components/dialog-forms/copy-collection-dialog.ts
index a820846..6a846c4 100644
--- a/src/views-components/dialog-forms/copy-collection-dialog.ts
+++ b/src/views-components/dialog-forms/copy-collection-dialog.ts
@@ -5,13 +5,13 @@
import { compose } from "redux";
import { withDialog } from "~/store/dialog/with-dialog";
import { reduxForm } from 'redux-form';
-import { COLLECTION_COPY_DIALOG, CollectionCopyFormDialogData, copyCollection } from '~/store/collections/collection-copy-actions';
+import { COLLECTION_COPY_FORM_NAME, CollectionCopyFormDialogData, copyCollection } from '~/store/collections/collection-copy-actions';
import { DialogCopy } from "~/views-components/dialog-copy/dialog-copy";
export const CopyCollectionDialog = compose(
- withDialog(COLLECTION_COPY_DIALOG),
+ withDialog(COLLECTION_COPY_FORM_NAME),
reduxForm<CollectionCopyFormDialogData>({
- form: COLLECTION_COPY_DIALOG,
+ form: COLLECTION_COPY_FORM_NAME,
onSubmit: (data, dispatch) => {
dispatch(copyCollection(data));
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list