Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #1116 : workspace correctly updated and minor fixes #1117

Merged
merged 1 commit into from
Oct 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fixed #1116 : workspace correctly updated and minor fixes
  • Loading branch information
MV88 committed Oct 10, 2016
commit dd672e334ffb6089c5da08c1cf6c52efdcf352e4
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