[ARVADOS-WORKBENCH2] updated: 1.2.0-181-g9f4bca6
Git user
git at public.curoverse.com
Tue Aug 28 08:24:29 EDT 2018
Summary of changes:
src/store/collections/collection-partial-copy-actions.ts | 16 ++++++++--------
.../dialog-forms/collection-partial-copy-dialog.ts | 6 +++---
2 files changed, 11 insertions(+), 11 deletions(-)
via 9f4bca6531631fc5ed21435f31db36720d58512b (commit)
from d37d39ad8825b03c39915e1258e294abcf0c3b6a (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 9f4bca6531631fc5ed21435f31db36720d58512b
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Tue Aug 28 14:24:16 2018 +0200
Update const name
Feature #14119
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/store/collections/collection-partial-copy-actions.ts b/src/store/collections/collection-partial-copy-actions.ts
index cba23ab..f0dd278 100644
--- a/src/store/collections/collection-partial-copy-actions.ts
+++ b/src/store/collections/collection-partial-copy-actions.ts
@@ -12,7 +12,7 @@ import { filterCollectionFilesBySelection } from '../collection-panel/collection
import { snackbarActions } from '~/store/snackbar/snackbar-actions';
import { getCommonResourceServiceError, CommonResourceServiceError } from '~/common/api/common-resource-service';
-export const COLLECTION_PARTIAL_COPY_DIALOG = 'COLLECTION_PARTIAL_COPY_DIALOG';
+export const COLLECTION_PARTIAL_COPY_FORM_NAME = 'COLLECTION_PARTIAL_COPY_DIALOG';
export interface CollectionPartialCopyFormData {
name: string;
@@ -29,15 +29,15 @@ export const openCollectionPartialCopyDialog = () =>
description: currentCollection.description,
projectUuid: ''
};
- dispatch(initialize(COLLECTION_PARTIAL_COPY_DIALOG, initialData));
+ dispatch(initialize(COLLECTION_PARTIAL_COPY_FORM_NAME, initialData));
dispatch<any>(resetPickerProjectTree());
- dispatch(dialogActions.OPEN_DIALOG({ id: COLLECTION_PARTIAL_COPY_DIALOG, data: {} }));
+ dispatch(dialogActions.OPEN_DIALOG({ id: COLLECTION_PARTIAL_COPY_FORM_NAME, data: {} }));
}
};
export const doCollectionPartialCopy = ({ name, description, projectUuid }: CollectionPartialCopyFormData) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
- dispatch(startSubmit(COLLECTION_PARTIAL_COPY_DIALOG));
+ dispatch(startSubmit(COLLECTION_PARTIAL_COPY_FORM_NAME));
const state = getState();
const currentCollection = state.collectionPanel.item;
if (currentCollection) {
@@ -53,17 +53,17 @@ export const doCollectionPartialCopy = ({ name, description, projectUuid }: Coll
const newCollection = await services.collectionService.create(collectionCopy);
const paths = filterCollectionFilesBySelection(state.collectionPanelFiles, false).map(file => file.id);
await services.collectionService.deleteFiles(newCollection.uuid, paths);
- dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_DIALOG }));
+ dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_FORM_NAME }));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'New collection created.', hideDuration: 2000 }));
} catch (e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(COLLECTION_PARTIAL_COPY_DIALOG, { name: 'Collection with this name already exists.' }));
+ dispatch(stopSubmit(COLLECTION_PARTIAL_COPY_FORM_NAME, { name: 'Collection with this name already exists.' }));
} else if (error === CommonResourceServiceError.UNKNOWN) {
- dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_DIALOG }));
+ dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_FORM_NAME }));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Could not create a copy of collection', hideDuration: 2000 }));
} else {
- dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_DIALOG }));
+ dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_FORM_NAME }));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Collection has been copied but may contain incorrect files.', hideDuration: 2000 }));
}
}
diff --git a/src/views-components/dialog-forms/collection-partial-copy-dialog.ts b/src/views-components/dialog-forms/collection-partial-copy-dialog.ts
index 33f6c25..801f62c 100644
--- a/src/views-components/dialog-forms/collection-partial-copy-dialog.ts
+++ b/src/views-components/dialog-forms/collection-partial-copy-dialog.ts
@@ -5,14 +5,14 @@
import { compose } from "redux";
import { reduxForm } from 'redux-form';
import { withDialog, } from '~/store/dialog/with-dialog';
-import { CollectionPartialCopyFormData, doCollectionPartialCopy, COLLECTION_PARTIAL_COPY_DIALOG } from '~/store/collections/collection-partial-copy-actions';
+import { CollectionPartialCopyFormData, doCollectionPartialCopy, COLLECTION_PARTIAL_COPY_FORM_NAME } from '~/store/collections/collection-partial-copy-actions';
import { CollectionPartialCopyDialog as Dialog } from "~/views-components/dialog-copy/collection-partial-copy-dialog";
export const CollectionPartialCopyDialog = compose(
- withDialog(COLLECTION_PARTIAL_COPY_DIALOG),
+ withDialog(COLLECTION_PARTIAL_COPY_FORM_NAME),
reduxForm({
- form: COLLECTION_PARTIAL_COPY_DIALOG,
+ form: COLLECTION_PARTIAL_COPY_FORM_NAME,
onSubmit: (data: CollectionPartialCopyFormData, dispatch) => {
dispatch(doCollectionPartialCopy(data));
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list