diff --git a/webui/src/Config.js b/webui/src/Config.js index 81af1b8..cbbbcae 100644 --- a/webui/src/Config.js +++ b/webui/src/Config.js @@ -47,6 +47,7 @@ class Config extends Component { ptpDscp: '', sapInterval: '', sapIntervalErr: false, + mdnsEnabled: false, syslogProto: '', syslogServer: '', syslogServerErr: false, @@ -80,6 +81,7 @@ class Config extends Component { ptpDscp: data.ptp_dscp, sapMcastAddr: data.sap_mcast_addr, sapInterval: data.sap_interval, + mdnsEnabled: data.mdns_enabled, syslogProto: data.syslog_proto, syslogServer: data.syslog_server, statusFile: data.status_file, @@ -116,7 +118,8 @@ class Config extends Component { this.state.sampleRate, this.state.maxTicFrameSize, this.state.sapMcastAddr, - this.state.sapInterval) + this.state.sapInterval, + this.state.mdnsEnabled) .then(response => toast.success('Config updated, daemon restart ...')); } @@ -171,6 +174,10 @@ class Config extends Component { this.setState({sapInterval: e.target.value, sapIntervalErr: !e.currentTarget.checkValidity()})} required/> + + + this.setState({mdnsEnabled: e.target.checked})} checked={this.state.mdnsEnabled ? true : undefined}/> + diff --git a/webui/src/Services.js b/webui/src/Services.js index 2d3512b..38d0c3b 100644 --- a/webui/src/Services.js +++ b/webui/src/Services.js @@ -76,7 +76,7 @@ export default class RestAPI { }); } - static setConfig(log_severity, syslog_proto, syslog_server, rtp_mcast_base, rtp_port, playout_delay, tic_frame_size_at_1fs, sample_rate, max_tic_frame_size, sap_mcast_addr, sap_interval) { + static setConfig(log_severity, syslog_proto, syslog_server, rtp_mcast_base, rtp_port, playout_delay, tic_frame_size_at_1fs, sample_rate, max_tic_frame_size, sap_mcast_addr, sap_interval, mdns_enabled) { return this.doFetch(config, { body: JSON.stringify({ log_severity: parseInt(log_severity, 10), @@ -89,7 +89,8 @@ export default class RestAPI { sample_rate: parseInt(sample_rate, 10), max_tic_frame_size: parseInt(max_tic_frame_size, 10), sap_mcast_addr: sap_mcast_addr, - sap_interval: parseInt(sap_interval, 10) + sap_interval: parseInt(sap_interval, 10), + mdns_enabled: mdns_enabled }), method: 'POST' }).catch(err => {