работающая генерация настроек
This commit is contained in:
@@ -1,3 +1,26 @@
|
||||
{% if 'tcpaccel' in params.paramGroupsList %}
|
||||
submitTcpaccelSettings() {
|
||||
if (this.submitStatus.tcpAccel) { return }
|
||||
this.submitStatus.tcpAccel = true
|
||||
fetch('/api/set/tcpAccel', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
"tcpAccel.en": this.param.tcpAccel.en,
|
||||
"tcpAccel.maxConnections": this.param.tcpAccel.maxConnections
|
||||
})
|
||||
}).then(async (resp) => {
|
||||
this.submitStatus.tcpAccel = false
|
||||
this.updateNetworkSettings(await resp.json())
|
||||
}).catch((reason) => {
|
||||
this.submitStatus.tcpAccel = false
|
||||
alert(`Ошибка при применении настроек: ${reason}`)
|
||||
})
|
||||
},
|
||||
updateTcpaccelSettings(vals) { console.log('tcp accel setting update function has no impl! update backend and write this function') }
|
||||
{% endif %}
|
||||
settingsSubmitQoS() {
|
||||
if (this.submitStatus.qos) { return }
|
||||
this.submitStatus.qos = true
|
||||
@@ -70,29 +93,6 @@
|
||||
})
|
||||
},
|
||||
|
||||
{% if 'tcpaccel' in params.groupsList %}
|
||||
settingsSubmitTcpAccel() {
|
||||
if (this.submitStatus.tcpAccel) { return }
|
||||
this.submitStatus.tcpAccel = true
|
||||
fetch('/api/set/tcpAccel', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
"tcpAccel.en": this.param.tcpAccel.en,
|
||||
"tcpAccel.maxConnections": this.param.tcpAccel.maxConnections
|
||||
})
|
||||
}).then(async (resp) => {
|
||||
this.submitStatus.tcpAccel = false
|
||||
this.updateNetworkSettings(await resp.json())
|
||||
}).catch((reason) => {
|
||||
this.submitStatus.tcpAccel = false
|
||||
alert(`Ошибка при применении настроек: ${reason}`)
|
||||
})
|
||||
},
|
||||
{% endif %}
|
||||
|
||||
updateQosSettings(vals) {
|
||||
this.submitStatus.qos = false
|
||||
this.paramsQos.en = vals["settings"]["qos.enabled"]
|
||||
@@ -240,4 +240,5 @@
|
||||
}
|
||||
|
||||
return result
|
||||
},
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user