Skip to content

Commit

Permalink
fixed geosolutions-it#1116 : workspace correctly updated and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MV88 committed Oct 10, 2016
1 parent 12d265f commit dd672e3
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 17 deletions.
2 changes: 1 addition & 1 deletion web/client/components/manager/importer/Import.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const Task = React.createClass({
<Table striped bordered condensed hover>
<thead>
<tr>
<th>#</th>
<th><Message msgId="importer.number"/></th>
<th><Message msgId="importer.import.status" /></th>
<th><Message msgId="importer.import.actions" /></th>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/manager/importer/Importer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ const Importer = React.createClass({
createWorkspace={this.props.createWorkspace}
datastoreTemplates={this.props.datastoreTemplates}
selectWorkSpace={this.props.selectWorkSpace}
selectedWorkSpace={this.getTargetWorkspace()}
selectedWorkSpace={this.getTargetWorkspace(this.props.selectedImport)}
workspaces={this.props.workspaces}
loadWorkspaces={this.props.loadWorkspaces}/>
</Col>
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/manager/importer/ImportsGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const ImportsGrid = React.createClass({
<Table striped bordered condensed hover>
<thead>
<tr>
<th>#</th>
<th><Message msgId="importer.number"/></th>
<th><Message msgId="importer.import.status" /></th>
<th><Message msgId="importer.import.actions" /></th>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/manager/importer/TransformsGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const TransformsGrid = React.createClass({
<Table striped bordered condensed hover>
<thead>
<tr>
<th>#</th>
<th><Message msgId="importer.number"/></th>
<th><Message msgId="importer.transforms.type" /></th>
<th><Message msgId="importer.transforms.actions" /></th>
</tr>
Expand Down
14 changes: 9 additions & 5 deletions web/client/components/manager/importer/Workspace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ module.exports = React.createClass({
},
renderAlert() {
if (this.props.status && (this.props.status.status === "error")) {
return (<Alert onDismiss={this.props.onStatusDismiss} key="error" bsStyle="danger"> Error creating workspace: {this.props.status && this.props.status.error && this.props.status.error.data}</Alert>);
return (<Alert onDismiss={this.props.onStatusDismiss} key="error" bsStyle="danger">
<Message msgId="importer.workspace.failure" msgParams={{statusWS: this.props.status && this.props.status.error && this.props.status.error.data}}/>
</Alert>);
} else if (this.props.status && (this.props.status.status === "success")) {
return (<Alert onDismiss={this.props.onStatusDismiss} key="success">Workspace "{this.props.status.workspace}" successfully created</Alert>);
return (<Alert onDismiss={this.props.onStatusDismiss} key="success">
<Message msgId="importer.workspace.success" msgParams={{statusWS: this.props.status && this.props.status.workspace}}/>
</Alert>);
}
},
render() {
Expand All @@ -67,7 +71,7 @@ module.exports = React.createClass({
}))}
/>)}
<div className="form-inline" style={{marginTop: "10px", display: this.props.enabled ? "none" : "block"}}>
<strong><Message msgId="importer.workspace.create" /></strong>
<strong><Message msgId="importer.workspace.createWS" /></strong>
<Input
onChange={this.validate}
ref="workspaceNewName"
Expand All @@ -76,8 +80,8 @@ module.exports = React.createClass({
name="workspace-name"
key="workspace-name"
type="text"
style={{width: "100%"}}
/> <Button disabled={!this.state.valid} bsStyle="primary" bsSize="small" onClick={this.createWorkspace}>Create</Button>
style={{width: "100%"}}/>
<Button disabled={!this.state.valid} bsStyle="primary" bsSize="small" onClick={this.createWorkspace}><Message msgId="importer.workspace.create"/></Button>
{this.renderAlert()}
</div>
</div>);
Expand Down
10 changes: 5 additions & 5 deletions web/client/plugins/manager/Importer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/


const React = require('react');
const Message = require('../../components/I18N/Message');
const {connect} = require('react-redux');
const {bindActionCreators} = require('redux');


const {
loadImports,
createImport, loadImport, runImport, deleteImport,
Expand Down Expand Up @@ -44,7 +43,8 @@ const ImporterPlugin = connect(
workspaces: state.importer && state.importer.workspaces,
selectedWorkSpace: state.importer && state.importer.selectedWorkSpace,
workspaceCreationStatus: state.importer && state.importer.workspaceCreationStatus
}; },
};
},
(dispatch, ownProps) => {
return bindActionCreators({
loadImports: loadImports.bind(null, getURL(ownProps)),
Expand Down Expand Up @@ -84,7 +84,7 @@ module.exports = {
id: "importer",
name: 'importer',
position: 1,
title: 'Import Data',
title: <Message msgId="importer.title"/>,
glyph: "import"
}
}),
Expand Down
6 changes: 5 additions & 1 deletion web/client/translations/data.en-US
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,12 @@
"process": "Session",
"number": "#",
"workspace": {
"create": "create a new workspace: ",
"create": "Create",
"createWS": "create a new workspace: ",
"target": "target workspace: ",
"select": "Select TargetWorkspace",
"success": "Error creating workspace: {statusWS}",
"failure": "Workspace {statusWS} successfully created",
"new": "New workspace name..."
},
"import": {
Expand Down
6 changes: 5 additions & 1 deletion web/client/translations/data.fr-FR
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,12 @@
"process": "Processus",
"number": "#",
"workspace": {
"create": "créer un nouvel espace de travail: ",
"create": "Créer",
"createWS": "créer un nouvel espace de travail: ",
"target": "cible espace de travail: ",
"success": "Erreur de création espace de travail: {statusWS}",
"failure": "Espace de travail {statusWS} créé avec succès",
"select": "Sélectionnez l'espace de travail cible",
"new": "Nom..."
},
"import": {
Expand Down
6 changes: 5 additions & 1 deletion web/client/translations/data.it-IT
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,12 @@
"process": "Processo",
"number": "#",
"workspace": {
"create": "Crea un nuovo workspace: ",
"create": "Crea",
"createWS": "Crea un nuovo workspace: ",
"target": "Workspace di destinazione: ",
"success": "Errore durante la creazione del workspace: {statusWS}",
"failure": "Workspace {statusWS} creato correttamente",
"select": "Seleziona il workspace di destinazione",
"new": "Nome del workspace..."
},
"import": {
Expand Down

0 comments on commit dd672e3

Please sign in to comment.