Commit 2478822b authored by Sonja Happ's avatar Sonja Happ

rename 'endpoint' to 'host'

parent 1745a0bd
...@@ -30,7 +30,7 @@ class ImportICDialog extends React.Component { ...@@ -30,7 +30,7 @@ class ImportICDialog extends React.Component {
this.state = { this.state = {
name: '', name: '',
endpoint: '', host: '',
uuid: '' uuid: ''
}; };
} }
...@@ -45,8 +45,8 @@ class ImportICDialog extends React.Component { ...@@ -45,8 +45,8 @@ class ImportICDialog extends React.Component {
uuid: this.state.uuid uuid: this.state.uuid
}; };
if (this.state.endpoint != null && this.state.endpoint !== "" && this.state.endpoint !== 'http://') { if (this.state.host != null && this.state.host !== "" && this.state.host !== 'http://') {
data.properties.endpoint = this.state.endpoint; data.host = this.state.host;
} }
this.props.onClose(data); this.props.onClose(data);
...@@ -61,7 +61,7 @@ class ImportICDialog extends React.Component { ...@@ -61,7 +61,7 @@ class ImportICDialog extends React.Component {
} }
resetState() { resetState() {
this.setState({ name: '', endpoint: 'http://', uuid: '' }); this.setState({ name: '', host: 'http://', uuid: '' });
} }
loadFile(fileList) { loadFile(fileList) {
...@@ -81,7 +81,7 @@ class ImportICDialog extends React.Component { ...@@ -81,7 +81,7 @@ class ImportICDialog extends React.Component {
self.imported = true; self.imported = true;
self.setState({ self.setState({
name: _.get(ic, 'properties.name') || _.get(ic, 'rawProperties.name'), name: _.get(ic, 'properties.name') || _.get(ic, 'rawProperties.name'),
endpoint: _.get(ic, 'properties.endpoint') || _.get(ic, 'rawProperties.endpoint'), host: _.get(ic, 'host'),
uuid: ic.uuid uuid: ic.uuid
}); });
}; };
...@@ -124,8 +124,8 @@ class ImportICDialog extends React.Component { ...@@ -124,8 +124,8 @@ class ImportICDialog extends React.Component {
<FormControl.Feedback /> <FormControl.Feedback />
</FormGroup> </FormGroup>
<FormGroup controlId="host"> <FormGroup controlId="host">
<FormLabel>Endpoint</FormLabel> <FormLabel>Host</FormLabel>
<FormControl type="text" placeholder="Enter host" value={this.state.endpoint} onChange={(e) => this.handleChange(e)} /> <FormControl type="text" placeholder="Enter host" value={this.state.host} onChange={(e) => this.handleChange(e)} />
<FormControl.Feedback /> <FormControl.Feedback />
</FormGroup> </FormGroup>
<FormGroup controlId="uuid" validationState={this.validateForm('uuid')}> <FormGroup controlId="uuid" validationState={this.validateForm('uuid')}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment