Rename updator -> updater
authorDaniel Kos <unodgs@gmail.com>
Sun, 5 Aug 2018 16:33:28 +0000 (18:33 +0200)
committerDaniel Kos <unodgs@gmail.com>
Sun, 5 Aug 2018 16:52:27 +0000 (18:52 +0200)
Feature #13856

Arvados-DCO-1.1-Signed-off-by: Daniel Kos <unodgs@gmail.com>

src/store/collections/collections-reducer.ts
src/store/collections/updater/collection-updater-action.ts [moved from src/store/collections/updator/collection-updator-action.ts with 84% similarity]
src/store/collections/updater/collection-updater-reducer.ts [moved from src/store/collections/updator/collection-updator-reducer.ts with 72% similarity]
src/views-components/context-menu/action-sets/collection-action-set.ts
src/views-components/dialog-update/dialog-collection-update.tsx
src/views-components/update-collection-dialog/update-collection-dialog..tsx

index 966cf29d515a90ed4d3d8d1f7bfe4742c0855a6e..155498a8823849288195568501835acc227b4397 100644 (file)
@@ -4,7 +4,7 @@
 
 import { combineReducers } from 'redux';
 import * as creator from "./creator/collection-creator-reducer";
-import * as updator from "./updator/collection-updator-reducer";
+import * as updator from "./updater/collection-updater-reducer";
 
 export type CollectionsState = {
     creator: creator.CollectionCreatorState;
@@ -14,4 +14,4 @@ export type CollectionsState = {
 export const collectionsReducer = combineReducers({
     creator: creator.collectionCreationReducer,
     updator: updator.collectionCreationReducer
-});
\ No newline at end of file
+});
similarity index 84%
rename from src/store/collections/updator/collection-updator-action.ts
rename to src/store/collections/updater/collection-updater-action.ts
index e12bfe548c01e69c874dc001c5533d398013a1b0..fff8b71b84fc91e21ab4e6f4d30aa0ea51ca8507 100644 (file)
@@ -12,8 +12,8 @@ import { initialize } from 'redux-form';
 import { collectionPanelActions } from "../../collection-panel/collection-panel-action";
 
 export const collectionUpdatorActions = unionize({
-    OPEN_COLLECTION_UPDATOR: ofType<{ uuid: string }>(),
-    CLOSE_COLLECTION_UPDATOR: ofType<{}>(),
+    OPEN_COLLECTION_UPDATER: ofType<{ uuid: string }>(),
+    CLOSE_COLLECTION_UPDATER: ofType<{}>(),
     UPDATE_COLLECTION_SUCCESS: ofType<{}>(),
 }, {
         tag: 'type',
@@ -22,10 +22,10 @@ export const collectionUpdatorActions = unionize({
 
 
 export const COLLECTION_FORM_NAME = 'collectionEditDialog';
-    
-export const openUpdator = (uuid: string) =>
+
+export const openUpdater = (uuid: string) =>
     (dispatch: Dispatch, getState: () => RootState) => {
-        dispatch(collectionUpdatorActions.OPEN_COLLECTION_UPDATOR({ uuid }));
+        dispatch(collectionUpdatorActions.OPEN_COLLECTION_UPDATER({ uuid }));
         const item = getState().collectionPanel.item;
         if(item) {
             dispatch(initialize(COLLECTION_FORM_NAME, { name: item.name, description: item.description }));
@@ -44,4 +44,4 @@ export const updateCollection = (collection: Partial<CollectionResource>) =>
             );
     };
 
-export type CollectionUpdatorAction = UnionOf<typeof collectionUpdatorActions>;
\ No newline at end of file
+export type CollectionUpdaterAction = UnionOf<typeof collectionUpdatorActions>;
similarity index 72%
rename from src/store/collections/updator/collection-updator-reducer.ts
rename to src/store/collections/updater/collection-updater-reducer.ts
index b9d0250c490e86aa3f9b3ba730b02cd34f44fb48..e7d4e63d6ba38da3d67ccdab9f3f209b66611343 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { collectionUpdatorActions, CollectionUpdatorAction } from './collection-updator-action';
+import { collectionUpdatorActions, CollectionUpdaterAction } from './collection-updater-action';
 
 export type CollectionUpdatorState = CollectionUpdator;
 
@@ -21,10 +21,10 @@ const initialState: CollectionUpdatorState = {
     uuid: ''
 };
 
-export const collectionCreationReducer = (state: CollectionUpdatorState = initialState, action: CollectionUpdatorAction) => {
+export const collectionCreationReducer = (state: CollectionUpdatorState = initialState, action: CollectionUpdaterAction) => {
     return collectionUpdatorActions.match(action, {
-        OPEN_COLLECTION_UPDATOR: ({ uuid }) => updateCollection(state, { uuid, opened: true }),
-        CLOSE_COLLECTION_UPDATOR: () => updateCollection(state, { opened: false }),
+        OPEN_COLLECTION_UPDATER: ({ uuid }) => updateCollection(state, { uuid, opened: true }),
+        CLOSE_COLLECTION_UPDATER: () => updateCollection(state, { opened: false }),
         UPDATE_COLLECTION_SUCCESS: () => updateCollection(state, { opened: false, uuid: "" }),
         default: () => state
     });
index 566f8f12e41c85cef26b7b945544b8c050811996..513cb5fc08647a8c419f38d5a8f6afc8822679a1 100644 (file)
@@ -6,7 +6,7 @@ import { ContextMenuActionSet } from "../context-menu-action-set";
 import { ToggleFavoriteAction } from "../actions/favorite-action";
 import { toggleFavorite } from "../../../store/favorites/favorites-actions";
 import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, ProvenanceGraphIcon, AdvancedIcon, RemoveIcon } from "../../../components/icon/icon";
-import { openUpdator } from "../../../store/collections/updator/collection-updator-action";
+import { openUpdater } from "../../../store/collections/updater/collection-updater-action";
 import { favoritePanelActions } from "../../../store/favorite-panel/favorite-panel-action";
 
 export const collectionActionSet: ContextMenuActionSet = [[
@@ -14,7 +14,7 @@ export const collectionActionSet: ContextMenuActionSet = [[
         icon: RenameIcon,
         name: "Edit collection",
         execute: (dispatch, resource) => {
-            dispatch<any>(openUpdator(resource.uuid));
+            dispatch<any>(openUpdater(resource.uuid));
         }
     },
     {
@@ -35,7 +35,7 @@ export const collectionActionSet: ContextMenuActionSet = [[
         component: ToggleFavoriteAction,
         execute: (dispatch, resource) => {
             dispatch<any>(toggleFavorite(resource)).then(() => {
-                dispatch<any>(favoritePanelActions.REQUEST_ITEMS());           
+                dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
             });
         }
     },
index 80a82b27fd97bb27a65dd954603e1cb7c2a965d8..dc278018e1841ec5ca1b1363db44272251cacc3b 100644 (file)
@@ -8,7 +8,7 @@ import { compose } from 'redux';
 import { ArvadosTheme } from '../../common/custom-theme';
 import { Dialog, DialogActions, DialogContent, DialogTitle, TextField, StyleRulesCallback, withStyles, WithStyles, Button, CircularProgress } from '../../../node_modules/@material-ui/core';
 import { COLLECTION_NAME_VALIDATION, COLLECTION_DESCRIPTION_VALIDATION } from '../../validators/create-project/create-project-validator';
-import { COLLECTION_FORM_NAME } from '../../store/collections/updator/collection-updator-action';
+import { COLLECTION_FORM_NAME } from '../../store/collections/updater/collection-updater-action';
 
 type CssRules = 'content' | 'actions' | 'textField' | 'buttonWrapper' | 'saveButton' | 'circularProgress';
 
@@ -128,4 +128,4 @@ export const DialogCollectionUpdate = compose(
                 />
             )
         }
-    );
\ No newline at end of file
+    );
index a91277e996d6fbdecac7617597f6f5c80df48dcc..b067b132f604fe8dd83da5ab83b1b190face2144 100644 (file)
@@ -7,7 +7,7 @@ import { Dispatch } from "redux";
 import { SubmissionError } from "redux-form";
 import { RootState } from "../../store/store";
 import { snackbarActions } from "../../store/snackbar/snackbar-actions";
-import { collectionUpdatorActions, updateCollection } from "../../store/collections/updator/collection-updator-action";
+import { collectionUpdatorActions, updateCollection } from "../../store/collections/updater/collection-updater-action";
 import { dataExplorerActions } from "../../store/data-explorer/data-explorer-action";
 import { PROJECT_PANEL_ID } from "../../views/project-panel/project-panel";
 import { DialogCollectionUpdate } from "../dialog-update/dialog-collection-update";
@@ -18,7 +18,7 @@ const mapStateToProps = (state: RootState) => ({
 
 const mapDispatchToProps = (dispatch: Dispatch) => ({
     handleClose: () => {
-        dispatch(collectionUpdatorActions.CLOSE_COLLECTION_UPDATOR());
+        dispatch(collectionUpdatorActions.CLOSE_COLLECTION_UPDATER());
     },
     onSubmit: (data: { name: string, description: string }) => {
         return dispatch<any>(editCollection(data))
@@ -41,4 +41,4 @@ const editCollection = (data: { name: string, description: string }) =>
         });
     };
 
-export const UpdateCollectionDialog = connect(mapStateToProps, mapDispatchToProps)(DialogCollectionUpdate);
\ No newline at end of file
+export const UpdateCollectionDialog = connect(mapStateToProps, mapDispatchToProps)(DialogCollectionUpdate);