Added to the WebUI the possibility to configure mDNS enabled option
This commit is contained in:
parent
4e02f74500
commit
449db1c73c
@ -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 {
|
||||
<th align="left"> <label>SAP interval (sec)</label> </th>
|
||||
<th align="left"> <input type='number' min='0' max='255' className='input-number' value={this.state.sapInterval} onChange={e => this.setState({sapInterval: e.target.value, sapIntervalErr: !e.currentTarget.checkValidity()})} required/> </th>
|
||||
</tr>
|
||||
<tr height="35">
|
||||
<th align="left"> <label>mDNS enabled</label> </th>
|
||||
<th align="left"> <input type="checkbox" onChange={e => this.setState({mdnsEnabled: e.target.checked})} checked={this.state.mdnsEnabled ? true : undefined}/> </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align="left"> <label>Network Interface</label> </th>
|
||||
<th align="left"> <input value={this.state.interfaceName} disabled/> </th>
|
||||
|
@ -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 => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user