add telegraf db configuration to source form

pull/587/head
Jade McGough 2016-11-18 13:27:36 -08:00 committed by Chris Goller
parent b37ef9477c
commit 6ab01e1cfe
1 changed files with 5 additions and 0 deletions

View File

@ -44,6 +44,7 @@ export const SourceForm = React.createClass({
username: this.sourceUsername.value, username: this.sourceUsername.value,
password: this.sourcePassword.value, password: this.sourcePassword.value,
'default': this.sourceDefault.checked, 'default': this.sourceDefault.checked,
telegraf: this.sourceTelegraf.value,
}); });
if (this.state.editMode) { if (this.state.editMode) {
updateSource(newSource).then(() => { updateSource(newSource).then(() => {
@ -117,6 +118,10 @@ export const SourceForm = React.createClass({
<label htmlFor="password">Password</label> <label htmlFor="password">Password</label>
<input type="password" name="password" ref={(r) => this.sourcePassword = r} className="form-control" id="password" onChange={this.onInputChange} value={source.password || ''}></input> <input type="password" name="password" ref={(r) => this.sourcePassword = r} className="form-control" id="password" onChange={this.onInputChange} value={source.password || ''}></input>
</div> </div>
<div className="form-group col-xs-8 col-xs-offset-2">
<label htmlFor="telegraf">Telegraf database</label>
<input type="text" name="telegraf" ref={(r) => this.sourceTelegraf = r} className="form-control" id="username" onChange={this.onInputChange} value={source.telegraf || ''}></input>
</div>
<div className="form-group col-xs-8 col-xs-offset-2"> <div className="form-group col-xs-8 col-xs-offset-2">
<div className="form-control-static"> <div className="form-control-static">
<input type="checkbox" id="defaultSourceCheckbox" defaultChecked={source.default} ref={(r) => this.sourceDefault = r} /> <input type="checkbox" id="defaultSourceCheckbox" defaultChecked={source.default} ref={(r) => this.sourceDefault = r} />