Include UnsafeSSL checkbox for insecureSkipVerify
parent
7573807804
commit
f10db6d3da
|
@ -0,0 +1,2 @@
|
||||||
|
export const insecureSkipVerifyText = `Unsafe SSL controls whether a client verifies the server's certificate chain and host name. \n
|
||||||
|
If checked, TLS accepts any certificate presented by the server and any host name in that certificate.`;
|
|
@ -1,5 +1,6 @@
|
||||||
import React, {PropTypes} from 'react';
|
import React, {PropTypes} from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
import {insecureSkipVerifyText} from 'src/shared/copy/tooltipText';
|
||||||
|
|
||||||
const {
|
const {
|
||||||
bool,
|
bool,
|
||||||
|
@ -27,6 +28,7 @@ export const SourceForm = React.createClass({
|
||||||
password: this.sourcePassword.value,
|
password: this.sourcePassword.value,
|
||||||
'default': this.sourceDefault.checked,
|
'default': this.sourceDefault.checked,
|
||||||
telegraf: this.sourceTelegraf.value,
|
telegraf: this.sourceTelegraf.value,
|
||||||
|
insecureSkipVerify: this.sourceInsecureSkipVerify ? this.sourceInsecureSkipVerify.checked : false,
|
||||||
});
|
});
|
||||||
this.props.onSubmit(newSource);
|
this.props.onSubmit(newSource);
|
||||||
},
|
},
|
||||||
|
@ -85,6 +87,14 @@ export const SourceForm = React.createClass({
|
||||||
<label htmlFor="defaultSourceCheckbox">Make this the default source</label>
|
<label htmlFor="defaultSourceCheckbox">Make this the default source</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{source.url.startsWith("https") ?
|
||||||
|
<div className="form-group col-xs-12">
|
||||||
|
<div className="form-control-static">
|
||||||
|
<input type="checkbox" id="insecureSkipVerifyCheckbox" defaultChecked={source.insecureSkipVerify} ref={(r) => this.sourceInsecureSkipVerify = r} />
|
||||||
|
<label htmlFor="insecureSkipVerifyCheckbox">Unsafe SSL</label>
|
||||||
|
</div>
|
||||||
|
<label className="form-helper">{insecureSkipVerifyText}</label>
|
||||||
|
</div> : null}
|
||||||
<div className="form-group form-group-submit col-xs-12 col-sm-6 col-sm-offset-3">
|
<div className="form-group form-group-submit col-xs-12 col-sm-6 col-sm-offset-3">
|
||||||
<button className={classNames('btn btn-block', {'btn-primary': editMode, 'btn-success': !editMode})} type="submit">{editMode ? "Save Changes" : "Add Source"}</button>
|
<button className={classNames('btn btn-block', {'btn-primary': editMode, 'btn-success': !editMode})} type="submit">{editMode ? "Save Changes" : "Add Source"}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue