Add a test upstreams button

Closes 
This commit is contained in:
Ildar Kamalov 2018-09-21 18:08:39 +03:00
parent 02b28f4511
commit f727f999f9
7 changed files with 77 additions and 3 deletions
client/src/components/Settings

View file

@ -43,6 +43,10 @@ export default class Settings extends Component {
this.props.setUpstream(this.props.settings.upstream);
};
handleUpstreamTest = () => {
this.props.testUpstream(this.props.settings.upstream);
};
renderSettings = (settings) => {
if (Object.keys(settings).length > 0) {
return Object.keys(settings).map((key) => {
@ -77,8 +81,10 @@ export default class Settings extends Component {
</Card>
<Upstream
upstream={upstream}
processingTestUpstream={settings.processingTestUpstream}
handleUpstreamChange={this.handleUpstreamChange}
handleUpstreamSubmit={this.handleUpstreamSubmit}
handleUpstreamTest={this.handleUpstreamTest}
/>
</div>
</div>