[ARVADOS-WORKBENCH2] updated: 1.2.0-148-g1f0d4a9
Git user
git at public.curoverse.com
Mon Aug 27 03:25:42 EDT 2018
Summary of changes:
.../collection-move-actions.ts} | 16 ++++++++--------
.../project-move-actions.ts} | 20 ++++++++++----------
.../action-sets/collection-action-set.ts | 2 +-
.../action-sets/collection-resource-action-set.ts | 2 +-
.../context-menu/action-sets/project-action-set.ts | 2 +-
.../move-collection-dialog.ts | 8 ++++----
.../move-project-dialog.ts | 10 +++++-----
.../move-to-dialog.tsx | 0
src/views/workbench/workbench.tsx | 6 +++---
9 files changed, 33 insertions(+), 33 deletions(-)
rename src/store/{move-collection-dialog/move-collection-dialog.ts => collections/collection-move-actions.ts} (72%)
rename src/store/{move-project-dialog/move-project-dialog.ts => projects/project-move-actions.ts} (71%)
rename src/views-components/{move-collection-dialog => dialog-forms}/move-collection-dialog.ts (65%)
rename src/views-components/{move-project-dialog => dialog-forms}/move-project-dialog.ts (62%)
rename src/views-components/{move-to-dialog => dialog-move}/move-to-dialog.tsx (100%)
via 1f0d4a9c57515816112baa3cb45bf97bec490737 (commit)
from d5e325adeee527001a70193bca5db4a02e726295 (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 1f0d4a9c57515816112baa3cb45bf97bec490737
Author: Janicki Artur <artur.janicki at contractors.roche.com>
Date: Mon Aug 27 09:25:35 2018 +0200
Change move-to feature - files path, rename variables and files
Feature #14103
Arvados-DCO-1.1-Signed-off-by: Janicki Artur <artur.janicki at contractors.roche.com>
diff --git a/src/store/move-collection-dialog/move-collection-dialog.ts b/src/store/collections/collection-move-actions.ts
similarity index 72%
rename from src/store/move-collection-dialog/move-collection-dialog.ts
rename to src/store/collections/collection-move-actions.ts
index 5950679..6fc836f 100644
--- a/src/store/move-collection-dialog/move-collection-dialog.ts
+++ b/src/store/collections/collection-move-actions.ts
@@ -10,33 +10,33 @@ import { RootState } from '~/store/store';
import { getCommonResourceServiceError, CommonResourceServiceError } from "~/common/api/common-resource-service";
import { snackbarActions } from '~/store/snackbar/snackbar-actions';
import { projectPanelActions } from '~/store/project-panel/project-panel-action';
-import { MoveToFormDialogData } from '../move-to-dialog/move-to-dialog';
+import { MoveToFormDialogData } from '~/store/move-to-dialog/move-to-dialog';
import { resetPickerProjectTree } from '~/store/project-tree-picker/project-tree-picker-actions';
-export const MOVE_COLLECTION_DIALOG = 'moveCollectionDialog';
+export const COLLECTION_MOVE_FORM_NAME = 'collectionMoveFormName';
export const openMoveCollectionDialog = (resource: { name: string, uuid: string }) =>
(dispatch: Dispatch) => {
dispatch<any>(resetPickerProjectTree());
- dispatch(initialize(MOVE_COLLECTION_DIALOG, resource));
- dispatch(dialogActions.OPEN_DIALOG({ id: MOVE_COLLECTION_DIALOG, data: {} }));
+ dispatch(initialize(COLLECTION_MOVE_FORM_NAME, resource));
+ dispatch(dialogActions.OPEN_DIALOG({ id: COLLECTION_MOVE_FORM_NAME, data: {} }));
};
export const moveCollection = (resource: MoveToFormDialogData) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
- dispatch(startSubmit(MOVE_COLLECTION_DIALOG));
+ dispatch(startSubmit(COLLECTION_MOVE_FORM_NAME));
try {
const collection = await services.collectionService.get(resource.uuid);
await services.collectionService.update(resource.uuid, { ...collection, ownerUuid: resource.ownerUuid });
dispatch(projectPanelActions.REQUEST_ITEMS());
- dispatch(dialogActions.CLOSE_DIALOG({ id: MOVE_COLLECTION_DIALOG }));
+ dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_MOVE_FORM_NAME }));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Collection has been moved', hideDuration: 2000 }));
} catch (e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(MOVE_COLLECTION_DIALOG, { ownerUuid: 'A collection with the same name already exists in the target project.' }));
+ dispatch(stopSubmit(COLLECTION_MOVE_FORM_NAME, { ownerUuid: 'A collection with the same name already exists in the target project.' }));
} else {
- dispatch(dialogActions.CLOSE_DIALOG({ id: MOVE_COLLECTION_DIALOG }));
+ dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_MOVE_FORM_NAME }));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Could not move the collection.', hideDuration: 2000 }));
}
}
diff --git a/src/store/move-project-dialog/move-project-dialog.ts b/src/store/projects/project-move-actions.ts
similarity index 71%
rename from src/store/move-project-dialog/move-project-dialog.ts
rename to src/store/projects/project-move-actions.ts
index 9e8e6f9..52d17ac 100644
--- a/src/store/move-project-dialog/move-project-dialog.ts
+++ b/src/store/projects/project-move-actions.ts
@@ -11,22 +11,22 @@ import { getCommonResourceServiceError, CommonResourceServiceError } from "~/com
import { snackbarActions } from '~/store/snackbar/snackbar-actions';
import { projectPanelActions } from '~/store/project-panel/project-panel-action';
import { getProjectList } from '~/store/project/project-action';
-import { MoveToFormDialogData } from '../move-to-dialog/move-to-dialog';
+import { MoveToFormDialogData } from '~/store/move-to-dialog/move-to-dialog';
import { resetPickerProjectTree } from '~/store/project-tree-picker/project-tree-picker-actions';
-import { findTreeItem } from '../project/project-reducer';
+import { findTreeItem } from '~/store/project/project-reducer';
-export const MOVE_PROJECT_DIALOG = 'moveProjectDialog';
+export const PROJECT_MOVE_FORM_NAME = 'projectMoveFormName';
export const openMoveProjectDialog = (resource: { name: string, uuid: string }) =>
(dispatch: Dispatch) => {
dispatch<any>(resetPickerProjectTree());
- dispatch(initialize(MOVE_PROJECT_DIALOG, resource));
- dispatch(dialogActions.OPEN_DIALOG({ id: MOVE_PROJECT_DIALOG, data: {} }));
+ dispatch(initialize(PROJECT_MOVE_FORM_NAME, resource));
+ dispatch(dialogActions.OPEN_DIALOG({ id: PROJECT_MOVE_FORM_NAME, data: {} }));
};
export const moveProject = (resource: MoveToFormDialogData) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
- dispatch(startSubmit(MOVE_PROJECT_DIALOG));
+ dispatch(startSubmit(PROJECT_MOVE_FORM_NAME));
try {
const project = await services.projectService.get(resource.uuid);
await services.projectService.update(resource.uuid, { ...project, ownerUuid: resource.ownerUuid });
@@ -36,16 +36,16 @@ export const moveProject = (resource: MoveToFormDialogData) =>
if (findTreeItem(projects.items, resource.ownerUuid)) {
dispatch<any>(getProjectList(resource.ownerUuid));
}
- dispatch(dialogActions.CLOSE_DIALOG({ id: MOVE_PROJECT_DIALOG }));
+ dispatch(dialogActions.CLOSE_DIALOG({ id: PROJECT_MOVE_FORM_NAME }));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Project has been moved', hideDuration: 2000 }));
} catch (e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(MOVE_PROJECT_DIALOG, { ownerUuid: 'A project with the same name already exists in the target project.' }));
+ dispatch(stopSubmit(PROJECT_MOVE_FORM_NAME, { ownerUuid: 'A project with the same name already exists in the target project.' }));
} else if (error === CommonResourceServiceError.OWNERSHIP_CYCLE) {
- dispatch(stopSubmit(MOVE_PROJECT_DIALOG, { ownerUuid: 'Cannot move a project into itself.' }));
+ dispatch(stopSubmit(PROJECT_MOVE_FORM_NAME, { ownerUuid: 'Cannot move a project into itself.' }));
} else {
- dispatch(dialogActions.CLOSE_DIALOG({ id: MOVE_PROJECT_DIALOG }));
+ dispatch(dialogActions.CLOSE_DIALOG({ id: PROJECT_MOVE_FORM_NAME }));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Could not move the project.', hideDuration: 2000 }));
}
}
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 e3c39f2..b3fdc3f 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
@@ -8,7 +8,7 @@ import { toggleFavorite } from "~/store/favorites/favorites-actions";
import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, ProvenanceGraphIcon, AdvancedIcon, RemoveIcon } from "~/components/icon/icon";
import { openCollectionUpdateDialog } from "~/store/collections/collection-update-actions";
import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
-import { openMoveCollectionDialog } from '~/store/move-collection-dialog/move-collection-dialog';
+import { openMoveCollectionDialog } from '~/store/collections/collection-move-actions';
import { openCollectionCopyDialog } from "~/store/collections/collection-copy-actions";
export const collectionActionSet: ContextMenuActionSet = [[
diff --git a/src/views-components/context-menu/action-sets/collection-resource-action-set.ts b/src/views-components/context-menu/action-sets/collection-resource-action-set.ts
index de39521..a299b93 100644
--- a/src/views-components/context-menu/action-sets/collection-resource-action-set.ts
+++ b/src/views-components/context-menu/action-sets/collection-resource-action-set.ts
@@ -8,7 +8,7 @@ import { toggleFavorite } from "~/store/favorites/favorites-actions";
import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, RemoveIcon } from "~/components/icon/icon";
import { openCollectionUpdateDialog } from "~/store/collections/collection-update-actions";
import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
-import { openMoveCollectionDialog } from '~/store/move-collection-dialog/move-collection-dialog';
+import { openMoveCollectionDialog } from '~/store/collections/collection-move-actions';
import { openCollectionCopyDialog } from '~/store/collections/collection-copy-actions';
export const collectionResourceActionSet: ContextMenuActionSet = [[
diff --git a/src/views-components/context-menu/action-sets/project-action-set.ts b/src/views-components/context-menu/action-sets/project-action-set.ts
index e466b94..4c15ce6 100644
--- a/src/views-components/context-menu/action-sets/project-action-set.ts
+++ b/src/views-components/context-menu/action-sets/project-action-set.ts
@@ -10,7 +10,7 @@ import { NewProjectIcon, RenameIcon, CopyIcon, MoveToIcon } from "~/components/i
import { ToggleFavoriteAction } from "../actions/favorite-action";
import { toggleFavorite } from "~/store/favorites/favorites-actions";
import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
-import { openMoveProjectDialog } from '~/store/move-project-dialog/move-project-dialog';
+import { openMoveProjectDialog } from '~/store/projects/project-move-actions';
import { PROJECT_CREATE_FORM_NAME, openProjectCreateDialog } from '~/store/projects/project-create-actions';
import { openProjectUpdateDialog } from '~/store/projects/project-update-actions';
diff --git a/src/views-components/move-collection-dialog/move-collection-dialog.ts b/src/views-components/dialog-forms/move-collection-dialog.ts
similarity index 65%
rename from src/views-components/move-collection-dialog/move-collection-dialog.ts
rename to src/views-components/dialog-forms/move-collection-dialog.ts
index 783f0c7..1164027 100644
--- a/src/views-components/move-collection-dialog/move-collection-dialog.ts
+++ b/src/views-components/dialog-forms/move-collection-dialog.ts
@@ -5,14 +5,14 @@
import { compose } from "redux";
import { withDialog } from "~/store/dialog/with-dialog";
import { reduxForm } from 'redux-form';
-import { MoveToFormDialog } from '../move-to-dialog/move-to-dialog';
-import { MOVE_COLLECTION_DIALOG, moveCollection } from '~/store/move-collection-dialog/move-collection-dialog';
+import { MoveToFormDialog } from '~/views-components/dialog-move/move-to-dialog';
+import { COLLECTION_MOVE_FORM_NAME, moveCollection } from '~/store/collections/collection-move-actions';
import { MoveToFormDialogData } from '~/store/move-to-dialog/move-to-dialog';
export const MoveCollectionDialog = compose(
- withDialog(MOVE_COLLECTION_DIALOG),
+ withDialog(COLLECTION_MOVE_FORM_NAME),
reduxForm<MoveToFormDialogData>({
- form: MOVE_COLLECTION_DIALOG,
+ form: COLLECTION_MOVE_FORM_NAME,
onSubmit: (data, dispatch) => {
dispatch(moveCollection(data));
}
diff --git a/src/views-components/move-project-dialog/move-project-dialog.ts b/src/views-components/dialog-forms/move-project-dialog.ts
similarity index 62%
rename from src/views-components/move-project-dialog/move-project-dialog.ts
rename to src/views-components/dialog-forms/move-project-dialog.ts
index 9ec6748..49e8ead 100644
--- a/src/views-components/move-project-dialog/move-project-dialog.ts
+++ b/src/views-components/dialog-forms/move-project-dialog.ts
@@ -5,15 +5,15 @@
import { compose } from "redux";
import { withDialog } from "~/store/dialog/with-dialog";
import { reduxForm } from 'redux-form';
-import { MOVE_PROJECT_DIALOG } from '~/store/move-project-dialog/move-project-dialog';
-import { moveProject } from '~/store/move-project-dialog/move-project-dialog';
+import { PROJECT_MOVE_FORM_NAME } from '~/store/projects/project-move-actions';
+import { moveProject } from '~/store/projects/project-move-actions';
import { MoveToFormDialogData } from '~/store/move-to-dialog/move-to-dialog';
-import { MoveToFormDialog } from '../move-to-dialog/move-to-dialog';
+import { MoveToFormDialog } from '~/views-components/dialog-move/move-to-dialog';
export const MoveProjectDialog = compose(
- withDialog(MOVE_PROJECT_DIALOG),
+ withDialog(PROJECT_MOVE_FORM_NAME),
reduxForm<MoveToFormDialogData>({
- form: MOVE_PROJECT_DIALOG,
+ form: PROJECT_MOVE_FORM_NAME,
onSubmit: (data, dispatch) => {
dispatch(moveProject(data));
}
diff --git a/src/views-components/move-to-dialog/move-to-dialog.tsx b/src/views-components/dialog-move/move-to-dialog.tsx
similarity index 100%
rename from src/views-components/move-to-dialog/move-to-dialog.tsx
rename to src/views-components/dialog-move/move-to-dialog.tsx
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index a7c5f46..973788b 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -51,9 +51,9 @@ import { FileRemoveDialog } from '~/views-components/file-remove-dialog/file-rem
import { MultipleFilesRemoveDialog } from '~/views-components/file-remove-dialog/multiple-files-remove-dialog';
import { DialogCollectionCreateWithSelectedFile } from '~/views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected';
import { UploadCollectionFilesDialog } from '~/views-components/upload-collection-files-dialog/upload-collection-files-dialog';
-import { CollectionPartialCopyDialog } from '../../views-components/collection-partial-copy-dialog/collection-partial-copy-dialog';
-import { MoveProjectDialog } from '~/views-components/move-project-dialog/move-project-dialog';
-import { MoveCollectionDialog } from '~/views-components/move-collection-dialog/move-collection-dialog';
+import { CollectionPartialCopyDialog } from '~/views-components/collection-partial-copy-dialog/collection-partial-copy-dialog';
+import { MoveProjectDialog } from '~/views-components/dialog-forms/move-project-dialog';
+import { MoveCollectionDialog } from '~/views-components/dialog-forms/move-collection-dialog';
import { CopyCollectionDialog } from '~/views-components/dialog-forms/copy-collection-dialog';
const DRAWER_WITDH = 240;
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list