Compare commits

...

2 Commits

2 changed files with 23 additions and 12 deletions

View File

@@ -252,6 +252,9 @@ namespace http::server {
return good;
}
contentLenghtHeader = std::stol(content_len);
if (contentLenghtHeader == 0) {
return good;
}
state_ = expecting_payload;
if (contentLenghtHeader > HTTP_MAX_PAYLOAD) {
return bad;

View File

@@ -859,8 +859,7 @@
},
settingsSubmitBucLnb() {
this.submitStatus.bucLnb = true
// TODO сделать всплывающее окно с подтверждением того, что настройки действительно нужно применить
if (this.submitStatus.bucLnb) { return }
let query = {
"buc.refClk10M": this.param.buc.refClk10M,
"buc.powering": parseInt(this.param.buc.powering),
@@ -869,16 +868,22 @@
"serviceSettings.refClk10M": this.param.serviceSettings.refClk10M,
"serviceSettings.autoStart": this.param.serviceSettings.autoStart
}
fetch('/api/set/bucLnb', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(query)
}).then(async (resp) => {
this.submitStatus.bucLnb = false
this.updateBucLnbSettings(await resp.json())
})
if (confirm('Вы уверены, что хотите сохранить настройки BUC и LNB?')) {
this.submitStatus.bucLnb = true
fetch('/api/set/bucLnb', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(query)
}).then(async (resp) => {
this.submitStatus.bucLnb = false
this.updateBucLnbSettings(await resp.json())
}).catch((reason) => {
this.submitStatus.bucLnb = false
alert(`Ошибка при применении настроек: ${reason}`)
})
}
},
settingsSubmitQoS() {
@@ -936,6 +941,9 @@
}).then(async (resp) => {
this.submitStatus.qos = false
this.updateQosSettings(await resp.json())
}).catch((reason) => {
this.submitStatus.qos = false
alert(`Ошибка при применении настроек: ${reason}`)
})
},