[ARVADOS-WORKBENCH2] created: 1.1.4-572-g22b7bf8

Git user git at public.curoverse.com
Wed Aug 8 08:20:10 EDT 2018


        at  22b7bf88fb799c912a813790301f715fb6b8ccf0 (commit)


commit 22b7bf88fb799c912a813790301f715fb6b8ccf0
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date:   Wed Aug 8 14:19:45 2018 +0200

    13979-creating-project-name-of-previously-created-project-is-still-populating-name-field-when-creating-another
    
    Feature #13979
    
    Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>

diff --git a/src/common/config.ts b/src/common/config.ts
index 775b114..250c806 100644
--- a/src/common/config.ts
+++ b/src/common/config.ts
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import Axios from "../../node_modules/axios";
+import Axios from "axios";
 
 export const CONFIG_URL = process.env.REACT_APP_ARVADOS_CONFIG_URL || "/config.json";
 
diff --git a/src/components/text-field/text-field.tsx b/src/components/text-field/text-field.tsx
index f7564f6..d9f11f4 100644
--- a/src/components/text-field/text-field.tsx
+++ b/src/components/text-field/text-field.tsx
@@ -5,7 +5,7 @@
 import * as React from 'react';
 import { WrappedFieldProps } from 'redux-form';
 import { ArvadosTheme } from '../../common/custom-theme';
-import { TextField as MaterialTextField, StyleRulesCallback, WithStyles, withStyles } from '../../../node_modules/@material-ui/core';
+import { TextField as MaterialTextField, StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core';
 
 type CssRules = 'textField';
 
diff --git a/src/services/auth-service/auth-service.ts b/src/services/auth-service/auth-service.ts
index f96edc7..dd47662 100644
--- a/src/services/auth-service/auth-service.ts
+++ b/src/services/auth-service/auth-service.ts
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { User } from "../../models/user";
-import { AxiosInstance } from "../../../node_modules/axios";
+import { AxiosInstance } from "axios";
 
 export const API_TOKEN_KEY = 'apiToken';
 export const USER_EMAIL_KEY = 'userEmail';
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 df298e4..4e7a600 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
@@ -2,17 +2,21 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
+import { reset } from "redux-form";
+
 import { ContextMenuActionSet } from "../context-menu-action-set";
 import { projectActions } from "../../../store/project/project-action";
 import { NewProjectIcon } from "../../../components/icon/icon";
 import { ToggleFavoriteAction } from "../actions/favorite-action";
 import { toggleFavorite } from "../../../store/favorites/favorites-actions";
 import { favoritePanelActions } from "../../../store/favorite-panel/favorite-panel-action";
+import { PROJECT_CREATE_DIALOG } from "../../dialog-create/dialog-project-create";
 
 export const projectActionSet: ContextMenuActionSet = [[{
     icon: NewProjectIcon,
     name: "New project",
     execute: (dispatch, resource) => {
+        dispatch(reset(PROJECT_CREATE_DIALOG));
         dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid }));
     }
 }, {
diff --git a/src/views-components/context-menu/action-sets/root-project-action-set.ts b/src/views-components/context-menu/action-sets/root-project-action-set.ts
index 139bd26..8c57f47 100644
--- a/src/views-components/context-menu/action-sets/root-project-action-set.ts
+++ b/src/views-components/context-menu/action-sets/root-project-action-set.ts
@@ -2,14 +2,18 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
+import { reset } from "redux-form";
+
 import { ContextMenuActionSet } from "../context-menu-action-set";
 import { projectActions } from "../../../store/project/project-action";
 import { NewProjectIcon } from "../../../components/icon/icon";
+import { PROJECT_CREATE_DIALOG } from "../../dialog-create/dialog-project-create";
 
 export const rootProjectActionSet: ContextMenuActionSet =  [[{
     icon: NewProjectIcon,
     name: "New project",
     execute: (dispatch, resource) => {
+        dispatch(reset(PROJECT_CREATE_DIALOG));
         dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid }));
     }
 }]];
diff --git a/src/views-components/dialog-create/dialog-collection-create.tsx b/src/views-components/dialog-create/dialog-collection-create.tsx
index 0686904..226b646 100644
--- a/src/views-components/dialog-create/dialog-collection-create.tsx
+++ b/src/views-components/dialog-create/dialog-collection-create.tsx
@@ -53,11 +53,13 @@ interface DialogCollectionCreateProps {
     files: UploadFile[];
 }
 
+export const COLLECTION_CREATE_DIALOG = "collectionCreateDialog";
+
 export const DialogCollectionCreate = compose(
     connect((state: RootState) => ({
         files: state.collections.uploader
     })),
-    reduxForm({ form: 'collectionCreateDialog' }),
+    reduxForm({ form: COLLECTION_CREATE_DIALOG }),
     withStyles(styles))(
         class DialogCollectionCreate extends React.Component<DialogCollectionCreateProps & DispatchProp & WithStyles<CssRules>> {
             render() {
diff --git a/src/views-components/dialog-create/dialog-project-create.tsx b/src/views-components/dialog-create/dialog-project-create.tsx
index 35fdca9..50e4c98 100644
--- a/src/views-components/dialog-create/dialog-project-create.tsx
+++ b/src/views-components/dialog-create/dialog-project-create.tsx
@@ -55,8 +55,10 @@ interface DialogProjectProps {
     pristine: boolean;
 }
 
+export const PROJECT_CREATE_DIALOG = "projectCreateDialog";
+
 export const DialogProjectCreate = compose(
-    reduxForm({ form: 'projectCreateDialog' }),
+    reduxForm({ form: PROJECT_CREATE_DIALOG }),
     withStyles(styles))(
     class DialogProjectCreate extends React.Component<DialogProjectProps & WithStyles<CssRules>> {
         render() {
diff --git a/src/views-components/dialog-update/dialog-collection-update.tsx b/src/views-components/dialog-update/dialog-collection-update.tsx
index febe112..f3f79fb 100644
--- a/src/views-components/dialog-update/dialog-collection-update.tsx
+++ b/src/views-components/dialog-update/dialog-collection-update.tsx
@@ -6,7 +6,7 @@ import * as React from 'react';
 import { reduxForm, Field } from 'redux-form';
 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 { Dialog, DialogActions, DialogContent, DialogTitle, TextField, StyleRulesCallback, withStyles, WithStyles, Button, CircularProgress } from '@material-ui/core';
 import { COLLECTION_NAME_VALIDATION, COLLECTION_DESCRIPTION_VALIDATION } from '../../validators/create-collection/create-collection-validator';
 import { COLLECTION_FORM_NAME } from '../../store/collections/updater/collection-updater-action';
 
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index a8552ee..fc716a5 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -13,6 +13,7 @@ import { RootState } from "../../store/store";
 import { MainAppBar, MainAppBarActionProps, MainAppBarMenuItem } from '../../views-components/main-app-bar/main-app-bar';
 import { Breadcrumb } from '../../components/breadcrumbs/breadcrumbs';
 import { push } from 'react-router-redux';
+import { reset } from 'redux-form';
 import { ProjectTree } from '../../views-components/project-tree/project-tree';
 import { TreeItem } from "../../components/tree/tree";
 import { getTreePath } from '../../store/project/project-reducer';
@@ -46,6 +47,8 @@ import { RenameFileDialog } from '../../views-components/rename-file-dialog/rena
 import { FileRemoveDialog } from '../../views-components/file-remove-dialog/file-remove-dialog';
 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 { COLLECTION_CREATE_DIALOG } from '../../views-components/dialog-create/dialog-collection-create';
+import { PROJECT_CREATE_DIALOG } from '../../views-components/dialog-create/dialog-project-create';
 
 const DRAWER_WITDH = 240;
 const APP_BAR_HEIGHT = 100;
@@ -355,10 +358,12 @@ export const Workbench = withStyles(styles)(
             }
 
             handleProjectCreationDialogOpen = (itemUuid: string) => {
+                this.props.dispatch(reset(PROJECT_CREATE_DIALOG));
                 this.props.dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: itemUuid }));
             }
 
             handleCollectionCreationDialogOpen = (itemUuid: string) => {
+                this.props.dispatch(reset(COLLECTION_CREATE_DIALOG));
                 this.props.dispatch(collectionCreateActions.OPEN_COLLECTION_CREATOR({ ownerUuid: itemUuid }));
             }
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list