работающая генерация базовых полей (числа, select, checkbox) + законченные настройки для TDMA
This commit is contained in:
parent
a7242c186d
commit
bf2d374705
@ -1,41 +1,32 @@
|
|||||||
{
|
{
|
||||||
"monitoring-params": {},
|
|
||||||
"modem_types": {
|
"modem_types": {
|
||||||
"tdma": {
|
"tdma": {
|
||||||
"modem_name": "RCSM-101 TDMA",
|
"modem_name": "RCSM-101 TDMA",
|
||||||
|
"dangerousParamGroups": {
|
||||||
|
"buclnb": "Применение неправильных настроек может вывести из строя оборудование! Продолжить?",
|
||||||
|
"network": "Применение этих настроек может сделать модем недоступным! Продолжить?"
|
||||||
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"rxtx": [
|
"rxtx": [
|
||||||
{
|
{"widget": "h2", "label": "Настройки приема/передачи"},
|
||||||
"widget": "h2",
|
|
||||||
"label": "Настройки приема/передачи"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"widget": "flex-container",
|
"widget": "flex-container",
|
||||||
"childs": [
|
"childs": [
|
||||||
{
|
{
|
||||||
"widget": "settings-container",
|
"widget": "settings-container",
|
||||||
"childs": [
|
"childs": [
|
||||||
{ "widget": "h3", "label": "Настройки передатчика" },
|
{"widget": "h3", "label": "Настройки передатчика"},
|
||||||
|
{"widget": "checkbox", "label": "Включить передатчик", "name": "txEn"},
|
||||||
{
|
{
|
||||||
"widget": "checkbox",
|
"widget": "select", "label": "Входные данные", "name": "txIsTestInput",
|
||||||
"label": "Включить передатчик",
|
|
||||||
"name": "txEn"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"widget": "select",
|
|
||||||
"label": "Входные данные",
|
|
||||||
"name": "txIsTestInput",
|
|
||||||
"values": [
|
"values": [
|
||||||
{
|
{"label": "SCPC", "value": "false"},
|
||||||
"label": "Тест",
|
{"label": "Тест", "value": "true"}
|
||||||
"value": "true"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "SCPC",
|
|
||||||
"value": "false"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
{"widget": "number", "label": "Центральная частота, КГц", "name": "txCentralFreq", "min": 900000, "step": 1},
|
||||||
|
{"widget": "number", "label": "Символьная скорость, Бод", "name": "txBaudrate", "min": 0, "step": 1},
|
||||||
|
{"widget": "number", "label": "Ослабление, дБ", "name": "txAttenuation", "min": 0, "step": 1}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -43,26 +34,74 @@
|
|||||||
"childs": [
|
"childs": [
|
||||||
{ "widget": "h3", "label": "Настройки приемника" },
|
{ "widget": "h3", "label": "Настройки приемника" },
|
||||||
{
|
{
|
||||||
"widget": "select",
|
"widget": "select", "label": "Режим управления усилением", "name": "rxAgcEn",
|
||||||
"label": "Режим управления усилением",
|
|
||||||
"name": "rxAgcEn",
|
|
||||||
"values": [
|
"values": [
|
||||||
{
|
{"label": "АРУ", "value": "true"},
|
||||||
"label": "АРУ",
|
{"label": "РРУ", "value": "false"}
|
||||||
"value": "true"
|
]
|
||||||
},
|
},
|
||||||
|
{"widget": "checkbox", "label": "Инверсия спектра", "name": "rxSpectrumInversion"},
|
||||||
|
{"widget": "number", "label": "Ручное усиление, дБ", "name": "rxManualGain", "v_show": "!paramRxtx.rxAgcEn", "min": -40},
|
||||||
|
{"widget": "number", "label": "Центральная частота, КГц", "name": "rxCentralFreq", "min": 900000, "step": 1},
|
||||||
|
{"widget": "number", "label": "Символьная скорость, Бод", "name": "rxBaudrate", "min": 0, "step": 1},
|
||||||
{
|
{
|
||||||
"label": "РРУ",
|
"widget": "select", "label": "Roll-off", "name": "rxRolloff",
|
||||||
"value": "false"
|
"values": [
|
||||||
|
{"label": "0.02", "value": "2"},
|
||||||
|
{"label": "0.05", "value": "5"},
|
||||||
|
{"label": "0.10", "value": "10"},
|
||||||
|
{"label": "0.15", "value": "15"},
|
||||||
|
{"label": "0.20", "value": "20"},
|
||||||
|
{"label": "0.25", "value": "25"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buclnb": [
|
||||||
|
{"widget": "h2", "label": "Настройки питания и опорного генератора"},
|
||||||
|
{
|
||||||
|
"widget": "flex-container",
|
||||||
|
"childs": [
|
||||||
|
{
|
||||||
|
"widget": "settings-container",
|
||||||
|
"childs": [
|
||||||
|
{"widget": "h3", "label": "Настройки BUC"},
|
||||||
|
{"widget": "checkbox", "label": "Подача опоры 10МГц", "name": "bucRefClk10M"},
|
||||||
|
{
|
||||||
|
"widget": "select", "label": "Питание BUC", "name": "bucPowering",
|
||||||
|
"values": [
|
||||||
|
{"label": "Выкл", "value": "0"},
|
||||||
|
{"label": "24В", "value": "24"}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"widget": "checkbox",
|
"widget": "settings-container",
|
||||||
"label": "Инверсия спектра",
|
"childs": [
|
||||||
"name": "rxSpectrumInversion"
|
{"widget": "h3", "label": "Настройки LNB"},
|
||||||
|
{"widget": "checkbox", "label": "Подача опоры 10МГц", "name": "lnbRefClk10M"},
|
||||||
|
{
|
||||||
|
"widget": "select", "label": "Питание LNB", "name": "lnbPowering",
|
||||||
|
"values": [
|
||||||
|
{"label": "Выкл", "value": "0"},
|
||||||
|
{"label": "13В", "value": "13"},
|
||||||
|
{"label": "18В", "value": "18"},
|
||||||
|
{"label": "24В", "value": "24"}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"widget": "settings-container",
|
||||||
|
"childs": [
|
||||||
|
{"widget": "h3", "label": "Сервисные настройки"},
|
||||||
|
{"widget": "checkbox", "label": "Подача опоры 10МГц на 'Выход 10МГц'", "name": "srvRefClk10M"},
|
||||||
|
{"widget": "checkbox", "label": "Автозапуск BUC и LNB при включении", "name": "bucLnbAutoStart"}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -87,10 +126,7 @@
|
|||||||
"modem_name": "RCSM-101",
|
"modem_name": "RCSM-101",
|
||||||
"params": {
|
"params": {
|
||||||
"rxtx": [
|
"rxtx": [
|
||||||
{
|
{"widget": "h2", "label": "Настройки приема/передачи"},
|
||||||
"widget": "h2",
|
|
||||||
"label": "Настройки приема/передачи"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"widget": "settings-container",
|
"widget": "settings-container",
|
||||||
"childs": [
|
"childs": [
|
||||||
@ -99,13 +135,13 @@
|
|||||||
"label": "Режим работы",
|
"label": "Режим работы",
|
||||||
"name": "isCinC",
|
"name": "isCinC",
|
||||||
"values": [
|
"values": [
|
||||||
{
|
|
||||||
"label": "CinC",
|
|
||||||
"value": "true"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"label": "SCPC",
|
"label": "SCPC",
|
||||||
"value": "false"
|
"value": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "CinC",
|
||||||
|
"value": "true"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -137,6 +173,70 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"cinc": [
|
||||||
|
{"widget": "h2", "label": "Настройки режима CinC", "v_show": "paramRxtx.isCinC"},
|
||||||
|
{
|
||||||
|
"widget": "settings-container", "v_show": "paramRxtx.isCinC",
|
||||||
|
"childs": [
|
||||||
|
{
|
||||||
|
"widget": "select", "label": "Метод расчета задержки", "name": "cincIsPositional",
|
||||||
|
"values": [
|
||||||
|
{"label": "Позиционированием", "value": "true"},
|
||||||
|
{"label": "Окном задержки", "value": "false"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{"widget": "number", "label": "Полоса поиска, КГц ±", "name": "cincSearchBandwidth", "min": 0, "step": 1, "max": 100}
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buclnb": [
|
||||||
|
{"widget": "h2", "label": "Настройки питания и опорного генератора"},
|
||||||
|
{
|
||||||
|
"widget": "flex-container",
|
||||||
|
"childs": [
|
||||||
|
{
|
||||||
|
"widget": "settings-container",
|
||||||
|
"childs": [
|
||||||
|
{"widget": "h3", "label": "Настройки BUC"},
|
||||||
|
{"widget": "checkbox", "label": "Подача опоры 10МГц", "name": "bucRefClk10M"},
|
||||||
|
{
|
||||||
|
"widget": "select", "label": "Питание BUC", "name": "bucPowering",
|
||||||
|
"values": [
|
||||||
|
{"label": "Выкл", "value": "0"},
|
||||||
|
{"label": "24В", "value": "24"},
|
||||||
|
{"label": "48В", "value": "48"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"widget": "settings-container",
|
||||||
|
"childs": [
|
||||||
|
{"widget": "h3", "label": "Настройки LNB"},
|
||||||
|
{"widget": "checkbox", "label": "Подача опоры 10МГц", "name": "lnbRefClk10M"},
|
||||||
|
{
|
||||||
|
"widget": "select", "label": "Питание LNB", "name": "lnbPowering",
|
||||||
|
"values": [
|
||||||
|
{"label": "Выкл", "value": "0"},
|
||||||
|
{"label": "13В", "value": "13"},
|
||||||
|
{"label": "18В", "value": "18"},
|
||||||
|
{"label": "24В", "value": "24"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"widget": "settings-container",
|
||||||
|
"childs": [
|
||||||
|
{"widget": "h3", "label": "Сервисные настройки"},
|
||||||
|
{"widget": "checkbox", "label": "Подача опоры 10МГц на 'Выход 10МГц'", "name": "srvRefClk10M"},
|
||||||
|
{"widget": "checkbox", "label": "Автозапуск BUC и LNB при включении", "name": "bucLnbAutoStart"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tabs": [
|
"tabs": [
|
||||||
|
@ -5,7 +5,34 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
def extract_param_names(mc):
|
def extract_param_names(mc):
|
||||||
result = {}
|
result = []
|
||||||
|
|
||||||
|
def helper_extract(widget):
|
||||||
|
if 'childs' in widget:
|
||||||
|
r = []
|
||||||
|
for child in widget['childs']:
|
||||||
|
r += helper_extract(child)
|
||||||
|
return r
|
||||||
|
elif 'name' in widget:
|
||||||
|
match widget['widget']:
|
||||||
|
case 'select': return [{"name": widget['name'], "initValue": widget['values'][0]['value']}]
|
||||||
|
case 'checkbox': return [{"name": widget['name'], "initValue": 'false'}]
|
||||||
|
case 'number': return [{"name": widget['name'], "initValue": widget['min'] if widget['min'] else '0'}]
|
||||||
|
|
||||||
|
return [{"name": widget['name'], "initValue": 'null'}]
|
||||||
|
return []
|
||||||
|
|
||||||
|
for cat in mc['params']:
|
||||||
|
ws = []
|
||||||
|
for w in mc['params'][cat]:
|
||||||
|
ws += helper_extract(w)
|
||||||
|
ws.sort(key=lambda k: k['name'])
|
||||||
|
result.append({
|
||||||
|
"group": cat,
|
||||||
|
"params": ws
|
||||||
|
})
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -27,7 +54,8 @@ def build_modem_env(modem):
|
|||||||
"header_tabs": mc['tabs'],
|
"header_tabs": mc['tabs'],
|
||||||
"tab_names_array": [t['name'] for t in mc['tabs']],
|
"tab_names_array": [t['name'] for t in mc['tabs']],
|
||||||
"params": mc["params"],
|
"params": mc["params"],
|
||||||
"paramGroupsWithNames": extract_param_names(mc),
|
"dangerousParamGroups": mc["dangerousParamGroups"] if 'dangerousParamGroups' in mc else {},
|
||||||
|
"paramGroups": extract_param_names(mc),
|
||||||
"paramGroupsList": extract_param_groups(mc),
|
"paramGroupsList": extract_param_groups(mc),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
7
front-generator/template/common/all-params-data.js.j2
Normal file
7
front-generator/template/common/all-params-data.js.j2
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{% for g in paramGroups %}
|
||||||
|
param{{ g['group'] | title }}: {
|
||||||
|
{% for p in g['params'] %}
|
||||||
|
{{ p['name'] }}: {{ p['initValue'] }},
|
||||||
|
{% endfor %}
|
||||||
|
},
|
||||||
|
{% endfor %}
|
29
front-generator/template/common/all-params-methods.js.j2
Normal file
29
front-generator/template/common/all-params-methods.js.j2
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{% for g in paramGroups %}
|
||||||
|
settingsSubmit{{ g['group'] | title }}() {
|
||||||
|
if (this.submitStatus.{{ g['group'] }}) { return }
|
||||||
|
{% if g['group'] in dangerousParamGroups %}
|
||||||
|
{ if (!confirm("{{ dangerousParamGroups[g['group']] }}")) return }
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
let query = {
|
||||||
|
{% for p in g['params'] %}
|
||||||
|
"{{ p['name'] }}": this.param{{ g['group'] | title }}.{{ p['name'] }},
|
||||||
|
{% endfor %}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.submitStatus.{{ g['group'] }} = true
|
||||||
|
fetch('/api/set/{{ g["group"] }}', {method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify(query) })
|
||||||
|
.then(async (resp) => { this.update{{ g['group'] | title }}Settings(await resp.json()) })
|
||||||
|
.catch((reason) => { alert(`Ошибка при применении настроек: ${reason}`) })
|
||||||
|
.finally(() => { this.submitStatus.{{ g['group'] }} = false })
|
||||||
|
},
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% for g in paramGroups %}
|
||||||
|
update{{ g['group'] | title }}Settings(vals) {
|
||||||
|
this.submitStatus.{{ g['group'] }} = false
|
||||||
|
{% for p in g['params'] %}
|
||||||
|
this.param{{ g['group'] | title }}.{{ p['name'] }} = vals["settings"]["{{ p['name'] }}"]
|
||||||
|
{% endfor %}
|
||||||
|
},
|
||||||
|
{% endfor %}
|
@ -1,55 +0,0 @@
|
|||||||
{% if 'rxtx' in params.paramGroupsList %}
|
|
||||||
paramsRxtx: {
|
|
||||||
isCinC: Boolean,
|
|
||||||
txEn: Boolean, // включен/выключен
|
|
||||||
modulatorMode: 'normal', // режим работы модулятора
|
|
||||||
autoStartTx: Boolean, // было "режим работы передатчика"
|
|
||||||
isTestInputData: Boolean, // входные данные: eth или test
|
|
||||||
txAttenuation: Number, // ослабление
|
|
||||||
txRolloff: Number,
|
|
||||||
txCymRate: Number,
|
|
||||||
txCenterFreq: Number,
|
|
||||||
txMode: null, // ccm/acm
|
|
||||||
txFrameSizeNormal: null, // 'normal' / 'short'
|
|
||||||
txIsPilots: false,
|
|
||||||
txCcmModulation: null,
|
|
||||||
txCcmSpeed: null,
|
|
||||||
txAcmMaxModulation: null,
|
|
||||||
txAcmMaxSpeed: null,
|
|
||||||
txAcmMinModulation: null,
|
|
||||||
txAcmMinSpeed: null,
|
|
||||||
txSnrReserve: null,
|
|
||||||
txServicePacketPeriod: null,
|
|
||||||
txAcmEn: false,
|
|
||||||
txAcmMaxAttenuation: null,
|
|
||||||
txAcmMinAttenuation: null,
|
|
||||||
txAcmRequiredSnr: null,
|
|
||||||
|
|
||||||
rxGainMode: null, // 'auto'/'manual' режим управления усилением
|
|
||||||
rxManualGain: 0, // усиление, только для ручного режима
|
|
||||||
rxSpectrumInversion: false,
|
|
||||||
rxRolloff: 0,
|
|
||||||
rxCymRate: 100000,
|
|
||||||
rxCenterFreq: 1200000.0,
|
|
||||||
},
|
|
||||||
{% endif %}
|
|
||||||
{% if 'cinc' in params.paramGroupsList %}
|
|
||||||
paramsCinc: {
|
|
||||||
cincMode: null, // 'positional' | 'delay'
|
|
||||||
cincSearchBandwidth: 0, // полоса поиска в кГц
|
|
||||||
cincPosition: {station: {latitude: 0, longitude: 0}, satelliteLongitude: 0},
|
|
||||||
cincDelayMin: 0,
|
|
||||||
cincDelayMax: 0
|
|
||||||
},
|
|
||||||
{% endif %}
|
|
||||||
{% if 'buclnb' in params.paramGroupsList %}
|
|
||||||
paramsBuclnb: {
|
|
||||||
bucRefClk10M: false, // подача опоры 10MHz
|
|
||||||
bucPowering: 0, // 0, 24, 48
|
|
||||||
lnbRefclk10m: false, // подача опоры 10MHz
|
|
||||||
lnbPowering: 0 // 0, 13, 18, 24
|
|
||||||
sysRefClk10M: false, // подача опоры 10MHz
|
|
||||||
sysAutoStart: false
|
|
||||||
},
|
|
||||||
{% endif %}
|
|
||||||
|
|
@ -1,180 +0,0 @@
|
|||||||
{% if 'rxtx' in params.paramGroupsList %}
|
|
||||||
settingsSubmitRxtx() {
|
|
||||||
if (this.submitStatus.rxTx) { return }
|
|
||||||
// потом добавить: "dvbs2.isPilots": this.param.dvbs2.isPilots
|
|
||||||
let query = {
|
|
||||||
"general.isCinC": this.param.general.isCinC,
|
|
||||||
"general.txEn": this.param.general.txEn,
|
|
||||||
"general.modulatorMode": this.param.general.modulatorMode,
|
|
||||||
"general.autoStartTx": this.param.general.autoStartTx,
|
|
||||||
"general.isTestInputData": this.param.general.isTestInputData,
|
|
||||||
"tx.attenuation": this.param.tx.attenuation,
|
|
||||||
"tx.rolloff": this.param.tx.rolloff,
|
|
||||||
"tx.cymRate": this.param.tx.cymRate,
|
|
||||||
"tx.centerFreq": this.param.tx.centerFreq,
|
|
||||||
"dvbs2.isAcm": this.param.dvbs2.mode === 'acm',
|
|
||||||
"dvbs2.frameSizeNormal": this.param.dvbs2.frameSizeNormal,
|
|
||||||
"dvbs2.ccm_modcod": toModcod(this.param.dvbs2.ccm_modulation, this.param.dvbs2.ccm_speed),
|
|
||||||
"dvbs2.acm_minModcod": toModcod(this.param.dvbs2.acm_minModulation, this.param.dvbs2.acm_minSpeed),
|
|
||||||
"dvbs2.acm_maxModcod": toModcod(this.param.dvbs2.acm_maxModulation, this.param.dvbs2.acm_maxSpeed),
|
|
||||||
"dvbs2.snrReserve": this.param.dvbs2.snrReserve,
|
|
||||||
"dvbs2.servicePacketPeriod": this.param.dvbs2.servicePacketPeriod,
|
|
||||||
"acm.en": this.param.acm.en,
|
|
||||||
"acm.maxAttenuation": this.param.acm.maxAttenuation,
|
|
||||||
"acm.minAttenuation": this.param.acm.minAttenuation,
|
|
||||||
"acm.requiredSnr": this.param.acm.requiredSnr,
|
|
||||||
"rx.gainMode": this.param.rx.gainMode,
|
|
||||||
"rx.manualGain": this.param.rx.manualGain,
|
|
||||||
"rx.spectrumInversion": this.param.rx.spectrumInversion,
|
|
||||||
"rx.rolloff": this.param.rx.rolloff,
|
|
||||||
"rx.cymRate": this.param.rx.cymRate,
|
|
||||||
"rx.centerFreq": this.param.rx.centerFreq
|
|
||||||
}
|
|
||||||
|
|
||||||
this.submitStatus.rxTx = true
|
|
||||||
fetch('/api/set/rxtx', {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
body: JSON.stringify(query)
|
|
||||||
}).then(async (resp) => {
|
|
||||||
this.submitStatus.rxTx = false
|
|
||||||
this.updateRxTxSettings(await resp.json())
|
|
||||||
}).catch((reason) => {
|
|
||||||
this.submitStatus.rxTx = false
|
|
||||||
alert(`Ошибка при применении настроек: ${reason}`)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
updateRxtxSettings(vals) {
|
|
||||||
this.submitStatus.rxTx = false
|
|
||||||
this.param.general.isCinC = vals["settings"]["general.isCinC"]
|
|
||||||
this.param.general.txEn = vals["settings"]["general.txEn"]
|
|
||||||
this.param.general.modulatorMode = vals["settings"]["general.modulatorMode"]
|
|
||||||
this.param.general.autoStartTx = vals["settings"]["general.autoStartTx"]
|
|
||||||
this.param.general.isTestInputData = vals["settings"]["general.isTestInputData"]
|
|
||||||
|
|
||||||
this.param.tx.attenuation = vals["settings"]["tx.attenuation"]
|
|
||||||
this.param.tx.rolloff = vals["settings"]["tx.rolloff"]
|
|
||||||
this.param.tx.cymRate = vals["settings"]["tx.cymRate"]
|
|
||||||
this.param.tx.centerFreq = vals["settings"]["tx.centerFreq"]
|
|
||||||
|
|
||||||
this.param.dvbs2.mode = (vals["settings"]["dvbs2.isAcm"] ? 'acm' : 'ccm')
|
|
||||||
this.param.dvbs2.frameSizeNormal = vals["settings"]["dvbs2.frameSizeNormal"]
|
|
||||||
// this.param.dvbs2.isPilots = vals["settings"]["dvbs2.isPilots"]
|
|
||||||
|
|
||||||
let m = extractModulationAndSpeedFromModcod(vals["settings"]["dvbs2.ccm_modcod"])
|
|
||||||
this.param.dvbs2.ccm_modulation = m.modulation
|
|
||||||
this.param.dvbs2.ccm_speed = m.speed
|
|
||||||
m = extractModulationAndSpeedFromModcod(vals["settings"]["dvbs2.acm_maxModcod"])
|
|
||||||
this.param.dvbs2.acm_maxModulation = m.modulation
|
|
||||||
this.param.dvbs2.acm_maxSpeed = m.speed
|
|
||||||
m = extractModulationAndSpeedFromModcod(vals["settings"]["dvbs2.acm_minModcod"])
|
|
||||||
this.param.dvbs2.acm_minModulation = m.modulation
|
|
||||||
this.param.dvbs2.acm_minSpeed = m.speed
|
|
||||||
|
|
||||||
this.param.dvbs2.snrReserve = vals["settings"]["dvbs2.snrReserve"]
|
|
||||||
this.param.dvbs2.servicePacketPeriod = vals["settings"]["dvbs2.servicePacketPeriod"]
|
|
||||||
|
|
||||||
this.param.acm.en = vals["settings"]["acm.en"]
|
|
||||||
this.param.acm.maxAttenuation = vals["settings"]["acm.maxAttenuation"]
|
|
||||||
this.param.acm.minAttenuation = vals["settings"]["acm.minAttenuation"]
|
|
||||||
this.param.acm.requiredSnr = vals["settings"]["acm.requiredSnr"]
|
|
||||||
|
|
||||||
this.param.rx.gainMode = vals["settings"]["rx.gainMode"]
|
|
||||||
this.param.rx.manualGain = vals["settings"]["rx.manualGain"]
|
|
||||||
this.param.rx.spectrumInversion = vals["settings"]["rx.spectrumInversion"]
|
|
||||||
this.param.rx.rolloff = vals["settings"]["rx.rolloff"]
|
|
||||||
this.param.rx.cymRate = vals["settings"]["rx.cymRate"]
|
|
||||||
this.param.rx.centerFreq = vals["settings"]["rx.centerFreq"]
|
|
||||||
},
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
settingsSubmitCinC() {
|
|
||||||
if (this.submitStatus.cinc) { return }
|
|
||||||
|
|
||||||
let query = {
|
|
||||||
"cinc.mode": this.param.cinc.mode,
|
|
||||||
"cinc.searchBandwidth": this.param.cinc.searchBandwidth,
|
|
||||||
"cinc.position.station.latitude": this.param.cinc.position.station.latitude,
|
|
||||||
"cinc.position.station.longitude": this.param.cinc.position.station.longitude,
|
|
||||||
"cinc.position.satelliteLongitude": this.param.cinc.position.satelliteLongitude,
|
|
||||||
"cinc.delayMin": this.param.cinc.delayMin,
|
|
||||||
"cinc.delayMax": this.param.cinc.delayMax
|
|
||||||
}
|
|
||||||
this.submitStatus.cinc = true
|
|
||||||
fetch('/api/set/cinc', {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
body: JSON.stringify(query)
|
|
||||||
}).then(async (resp) => {
|
|
||||||
this.submitStatus.cinc = false
|
|
||||||
this.updateCincSettings(await resp.json())
|
|
||||||
}).catch((reason) => {
|
|
||||||
this.submitStatus.cinc = false
|
|
||||||
alert(`Ошибка при применении настроек: ${reason}`)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
settingsSubmitBucLnb() {
|
|
||||||
if (this.submitStatus.bucLnb) { return }
|
|
||||||
let query = {
|
|
||||||
"buc.refClk10M": this.param.buc.refClk10M,
|
|
||||||
"buc.powering": parseInt(this.param.buc.powering),
|
|
||||||
"lnb.refClk10M": this.param.lnb.refClk10M,
|
|
||||||
"lnb.powering": parseInt(this.param.lnb.powering),
|
|
||||||
"serviceSettings.refClk10M": this.param.serviceSettings.refClk10M,
|
|
||||||
"serviceSettings.autoStart": this.param.serviceSettings.autoStart
|
|
||||||
}
|
|
||||||
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}`)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
updateCincSettings(vals) {
|
|
||||||
this.submitStatus.cinc = false
|
|
||||||
this.param.cinc.mode = vals["settings"]["cinc.mode"]
|
|
||||||
this.param.cinc.searchBandwidth = vals["settings"]["cinc.searchBandwidth"]
|
|
||||||
this.param.cinc.position.station.latitude = vals["settings"]["cinc.position.station.latitude"]
|
|
||||||
this.param.cinc.position.station.longitude = vals["settings"]["cinc.position.station.longitude"]
|
|
||||||
this.param.cinc.position.satelliteLongitude = vals["settings"]["cinc.position.satelliteLongitude"]
|
|
||||||
this.param.cinc.delayMin = vals["settings"]["cinc.delayMin"]
|
|
||||||
this.param.cinc.delayMax = vals["settings"]["cinc.delayMax"]
|
|
||||||
},
|
|
||||||
|
|
||||||
updateBucLnbSettings(vals) {
|
|
||||||
this.submitStatus.bucLnb = false
|
|
||||||
this.param.buc.refClk10M = vals["settings"]["buc.refClk10M"]
|
|
||||||
this.param.buc.powering = vals["settings"]["buc.powering"]
|
|
||||||
this.param.lnb.refClk10M = vals["settings"]["lnb.refClk10M"]
|
|
||||||
this.param.lnb.powering = vals["settings"]["lnb.powering"]
|
|
||||||
this.param.serviceSettings.refClk10M = vals["settings"]["serviceSettings.refClk10M"]
|
|
||||||
this.param.serviceSettings.autoStart = vals["settings"]["serviceSettings.autoStart"]
|
|
||||||
},
|
|
||||||
|
|
||||||
updateSettings(vals) {
|
|
||||||
this.settingFetchComplete = true
|
|
||||||
this.updateRxTxSettings(vals)
|
|
||||||
this.updateCincSettings(vals)
|
|
||||||
this.updateBucLnbSettings(vals)
|
|
||||||
this.updateQosSettings(vals)
|
|
||||||
this.updateNetworkSettings(vals)
|
|
||||||
this.updateDebugSendSettings(vals)
|
|
||||||
},
|
|
@ -2,8 +2,8 @@
|
|||||||
<div class="tabs-body-item" v-if="activeTab === 'setup' && settingFetchComplete">
|
<div class="tabs-body-item" v-if="activeTab === 'setup' && settingFetchComplete">
|
||||||
{% for cat in ['rxtx', 'cinc', 'buclnb'] %}
|
{% for cat in ['rxtx', 'cinc', 'buclnb'] %}
|
||||||
{% if cat in params %}
|
{% if cat in params %}
|
||||||
{% for w in params[cat] %}{{ build_widget(cat, w) }}{% endfor %}
|
{% for w in params[cat] %}{{ build_widget(cat, w) | indent(12, true) }}{% endfor %}
|
||||||
<button class="action-button" @click="settingsSubmitBucLnb()">Сохранить <span class="submit-spinner" v-show="submitStatus.bucLnb"></span></button>
|
<button class="action-button" @click="settingsSubmit{{ cat | title }}()">Сохранить <span class="submit-spinner" v-show="submitStatus.{{ cat }}"></span></button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
@ -1,32 +1,25 @@
|
|||||||
{% macro build_widget_checkbox(param_group, widget) %}<label{% if widget.v_show %} v-show="{{ widget.v_show }}"{% endif %}>
|
{% macro build_widget_checkbox(param_group, widget) %}<label{% if widget.v_show %} v-show="{{ widget.v_show }}"{% endif %}>
|
||||||
<span>{{ widget.label }}</span>
|
<span>{{ widget.label }}</span>
|
||||||
<span class="toggle-input">
|
<span class="toggle-input"><input type="checkbox" v-model="param{{ param_group | title }}.{{ widget.name }}" /><span class="slider"></span></span>
|
||||||
<input type="checkbox" v-model="param{{ param_group | title }}.{{ widget.name }}" />
|
|
||||||
<span class="slider"></span>
|
|
||||||
</span>
|
|
||||||
</label>{% endmacro %}
|
</label>{% endmacro %}
|
||||||
|
|
||||||
{% macro build_widget_number(param_group, widget) %}<label{% if widget.v_show %} v-show="{{ widget.v_show }}"{% endif %}>
|
{% macro build_widget_number(param_group, widget) %}<label{% if widget.v_show %} v-show="{{ widget.v_show }}"{% endif %}><span>{{ widget.label }}</span><input type="number" v-model="param{{ param_group | title }}.{{ widget.name }}"{% if widget['min'] %} min="{{ widget['min'] }}"{% endif %}{% if widget['max'] %} max="{{ widget['max'] }}"{% endif %}{% if widget['step'] %} step="{{ widget['step'] }}"{% endif %}/></label>{% endmacro %}
|
||||||
</label>{% endmacro %}
|
|
||||||
|
|
||||||
{% macro build_widget_select(param_group, widget) %}<label{% if widget.v_show %} v-show="{{ widget.v_show }}"{% endif %}>
|
{% macro build_widget_select(param_group, widget) %}<label{% if widget.v_show %} v-show="{{ widget.v_show }}"{% endif %}>
|
||||||
<span>{{ widget.label }}</span>
|
<span>{{ widget.label }}</span>
|
||||||
<select v-model="param{{ param_group | title }}.{{ widget.name }}">
|
<select v-model="param{{ param_group | title }}.{{ widget.name }}">
|
||||||
{% for opt in widget['values'] %}
|
{% for opt in widget['values'] %} <option :value="{{ opt.value }}">{{ opt.label }}</option>
|
||||||
<option :value="{{ opt.value }}">{{ opt.label }}</option>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</label>{% endmacro %}
|
</label>{% endmacro %}
|
||||||
|
|
||||||
{% macro build_widget_flex_container(param_group, widget) %}<div class="tabs-item-flex-container"{% if widget.v_show %} v-show="{{ widget.v_show }}"{% endif %}>
|
{% macro build_widget_flex_container(param_group, widget) %}<div class="tabs-item-flex-container"{% if widget.v_show %} v-show="{{ widget.v_show }}"{% endif %}>
|
||||||
{% for w in widget.childs %}{{ build_widget(param_group, w) }}{% endfor %}
|
{% for w in widget.childs %}{{ build_widget(param_group, w) | indent(4, true) }}{% endfor %}
|
||||||
</div>
|
</div>{% endmacro %}
|
||||||
{% endmacro %}
|
|
||||||
|
|
||||||
{% macro build_widget_settings_container(param_group, widget) %}<div class="settings-set-container"{% if widget.v_show %} v-show="{{ widget.v_show }}"{% endif %}>
|
{% macro build_widget_settings_container(param_group, widget) %}<div class="settings-set-container"{% if widget.v_show %} v-show="{{ widget.v_show }}"{% endif %}>
|
||||||
{% for w in widget.childs %}{{ build_widget(param_group, w) }}{% endfor %}
|
{% for w in widget.childs %}{{ build_widget(param_group, w) | indent(4, true) }}{% endfor %}
|
||||||
</div>
|
</div>{% endmacro %}
|
||||||
{% endmacro %}
|
|
||||||
|
|
||||||
|
|
||||||
{% macro build_widget(param_group, widget) %}{% if widget.widget == 'flex-container' %}{{ build_widget_flex_container(param_group, widget) }}
|
{% macro build_widget(param_group, widget) %}{% if widget.widget == 'flex-container' %}{{ build_widget_flex_container(param_group, widget) }}
|
||||||
|
@ -83,9 +83,13 @@
|
|||||||
modemReboot: null
|
modemReboot: null
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// ========== include from 'common/all-params-data.js.j2'
|
||||||
|
{% include 'common/all-params-data.js.j2' %}
|
||||||
|
// ========== include end from 'common/all-params-data.js.j2'
|
||||||
|
|
||||||
{% for tab in header_tabs %}
|
{% for tab in header_tabs %}
|
||||||
// ========== include from '{{ 'common/' ~ tab.name ~ '-data.js.j2' }}'
|
// ========== include from '{{ 'common/' ~ tab.name ~ '-data.js.j2' }}'
|
||||||
{% include 'common/' ~ tab.name ~ '-data.js.j2' %}
|
{% include 'common/' ~ tab.name ~ '-data.js.j2' ignore missing %}
|
||||||
// ========== include end from '{{ 'common/' ~ tab.name ~ '-data.js.j2' }}'
|
// ========== include end from '{{ 'common/' ~ tab.name ~ '-data.js.j2' }}'
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -129,9 +133,13 @@
|
|||||||
return ""
|
return ""
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// ========== include from 'common/all-params-methods.js.j2'
|
||||||
|
{% include 'common/all-params-methods.js.j2' %}
|
||||||
|
// ========== include end from 'common/all-params-methods.js.j2'
|
||||||
|
|
||||||
{% for tab in header_tabs %}
|
{% for tab in header_tabs %}
|
||||||
// ========== include from '{{ 'common/' ~ tab.name ~ '-methods.js.j2' }}'
|
// ========== include from '{{ 'common/' ~ tab.name ~ '-methods.js.j2' }}'
|
||||||
{% include 'common/' ~ tab.name ~ '-methods.js.j2' %}
|
{% include 'common/' ~ tab.name ~ '-methods.js.j2' ignore missing %}
|
||||||
// ========== include end from '{{ 'common/' ~ tab.name ~ '-methods.js.j2' }}'
|
// ========== include end from '{{ 'common/' ~ tab.name ~ '-methods.js.j2' }}'
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -123,32 +123,87 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabs-body-item" v-if="activeTab === 'setup' && settingFetchComplete">
|
<div class="tabs-body-item" v-if="activeTab === 'setup' && settingFetchComplete">
|
||||||
<h2>Настройки приема/передачи</h2>
|
<h2>Настройки приема/передачи</h2>
|
||||||
<div class="settings-set-container">
|
<div class="settings-set-container">
|
||||||
<label>
|
<label>
|
||||||
|
<span>Режим работы</span>
|
||||||
|
<select v-model="paramRxtx.isCinC">
|
||||||
|
<option :value="false">SCPC</option>
|
||||||
|
<option :value="true">CinC</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="tabs-item-flex-container">
|
||||||
|
<div class="settings-set-container">
|
||||||
|
<h3>Настройки приема/передачи</h3>
|
||||||
|
<label>
|
||||||
<span>Режим работы</span>
|
<span>Режим работы</span>
|
||||||
<select v-model="paramRxtx.isCinC">
|
<select v-model="paramRxtx.isCinC">
|
||||||
<option :value="true">CinC</option>
|
<option :value="true">CinC</option>
|
||||||
<option :value="false">SCPC</option>
|
<option :value="false">SCPC</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="tabs-item-flex-container">
|
<button class="action-button" @click="settingsSubmitRxtx()">Сохранить <span class="submit-spinner" v-show="submitStatus.rxtx"></span></button>
|
||||||
<div class="settings-set-container">
|
<h2 v-show="paramRxtx.isCinC">Настройки режима CinC</h2>
|
||||||
<h3>Настройки приема/передачи</h3>
|
<div class="settings-set-container" v-show="paramRxtx.isCinC">
|
||||||
<label>
|
<label>
|
||||||
<span>Режим работы</span>
|
<span>Метод расчета задержки</span>
|
||||||
<select v-model="paramRxtx.isCinC">
|
<select v-model="paramCinc.cincIsPositional">
|
||||||
<option :value="true">CinC</option>
|
<option :value="true">Позиционированием</option>
|
||||||
<option :value="false">SCPC</option>
|
<option :value="false">Окном задержки</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
<label><span>Полоса поиска, КГц ±</span><input type="number" v-model="paramCinc.cincSearchBandwidth" max="100" step="1"/></label>
|
||||||
|
</div>
|
||||||
</div>
|
<button class="action-button" @click="settingsSubmitCinc()">Сохранить <span class="submit-spinner" v-show="submitStatus.cinc"></span></button>
|
||||||
|
<h2>Настройки питания и опорного генератора</h2>
|
||||||
<button class="action-button" @click="settingsSubmitBucLnb()">Сохранить <span class="submit-spinner" v-show="submitStatus.bucLnb"></span></button>
|
<div class="tabs-item-flex-container">
|
||||||
|
<div class="settings-set-container">
|
||||||
|
<h3>Настройки BUC</h3>
|
||||||
|
<label>
|
||||||
|
<span>Подача опоры 10МГц</span>
|
||||||
|
<span class="toggle-input"><input type="checkbox" v-model="paramBuclnb.bucRefClk10M" /><span class="slider"></span></span>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<span>Питание BUC</span>
|
||||||
|
<select v-model="paramBuclnb.bucPowering">
|
||||||
|
<option :value="0">Выкл</option>
|
||||||
|
<option :value="24">24В</option>
|
||||||
|
<option :value="48">48В</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="settings-set-container">
|
||||||
|
<h3>Настройки LNB</h3>
|
||||||
|
<label>
|
||||||
|
<span>Подача опоры 10МГц</span>
|
||||||
|
<span class="toggle-input"><input type="checkbox" v-model="paramBuclnb.lnbRefClk10M" /><span class="slider"></span></span>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<span>Питание LNB</span>
|
||||||
|
<select v-model="paramBuclnb.lnbPowering">
|
||||||
|
<option :value="0">Выкл</option>
|
||||||
|
<option :value="13">13В</option>
|
||||||
|
<option :value="18">18В</option>
|
||||||
|
<option :value="24">24В</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="settings-set-container">
|
||||||
|
<h3>Сервисные настройки</h3>
|
||||||
|
<label>
|
||||||
|
<span>Подача опоры 10МГц на 'Выход 10МГц'</span>
|
||||||
|
<span class="toggle-input"><input type="checkbox" v-model="paramBuclnb.srvRefClk10M" /><span class="slider"></span></span>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<span>Автозапуск BUC и LNB при включении</span>
|
||||||
|
<span class="toggle-input"><input type="checkbox" v-model="paramBuclnb.bucLnbAutoStart" /><span class="slider"></span></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button class="action-button" @click="settingsSubmitBuclnb()">Сохранить <span class="submit-spinner" v-show="submitStatus.buclnb"></span></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabs-body-item" v-if="activeTab === 'qos' && settingFetchComplete">
|
<div class="tabs-body-item" v-if="activeTab === 'qos' && settingFetchComplete">
|
||||||
<h2>Настройки QoS</h2>
|
<h2>Настройки QoS</h2>
|
||||||
@ -413,6 +468,25 @@
|
|||||||
modemReboot: null
|
modemReboot: null
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// ========== include from 'common/all-params-data.js.j2'
|
||||||
|
paramRxtx: {
|
||||||
|
isCinC: false,
|
||||||
|
isCinC: true,
|
||||||
|
},
|
||||||
|
paramCinc: {
|
||||||
|
cincIsPositional: true,
|
||||||
|
cincSearchBandwidth: 0,
|
||||||
|
},
|
||||||
|
paramBuclnb: {
|
||||||
|
bucLnbAutoStart: false,
|
||||||
|
bucPowering: 0,
|
||||||
|
bucRefClk10M: false,
|
||||||
|
lnbPowering: 0,
|
||||||
|
lnbRefClk10M: false,
|
||||||
|
srvRefClk10M: false,
|
||||||
|
},
|
||||||
|
// ========== include end from 'common/all-params-data.js.j2'
|
||||||
|
|
||||||
// ========== include from 'common/monitoring-data.js.j2'
|
// ========== include from 'common/monitoring-data.js.j2'
|
||||||
statRx: {
|
statRx: {
|
||||||
// индикаторы
|
// индикаторы
|
||||||
@ -509,6 +583,75 @@
|
|||||||
return ""
|
return ""
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// ========== include from 'common/all-params-methods.js.j2'
|
||||||
|
settingsSubmitRxtx() {
|
||||||
|
if (this.submitStatus.rxtx) { return }
|
||||||
|
|
||||||
|
let query = {
|
||||||
|
"isCinC": this.paramRxtx.isCinC,
|
||||||
|
"isCinC": this.paramRxtx.isCinC,
|
||||||
|
}
|
||||||
|
|
||||||
|
this.submitStatus.rxtx = true
|
||||||
|
fetch('/api/set/rxtx', {method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify(query) })
|
||||||
|
.then(async (resp) => { this.updateRxtxSettings(await resp.json()) })
|
||||||
|
.catch((reason) => { alert(`Ошибка при применении настроек: ${reason}`) })
|
||||||
|
.finally(() => { this.submitStatus.rxtx = false })
|
||||||
|
},
|
||||||
|
settingsSubmitCinc() {
|
||||||
|
if (this.submitStatus.cinc) { return }
|
||||||
|
|
||||||
|
let query = {
|
||||||
|
"cincIsPositional": this.paramCinc.cincIsPositional,
|
||||||
|
"cincSearchBandwidth": this.paramCinc.cincSearchBandwidth,
|
||||||
|
}
|
||||||
|
|
||||||
|
this.submitStatus.cinc = true
|
||||||
|
fetch('/api/set/cinc', {method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify(query) })
|
||||||
|
.then(async (resp) => { this.updateCincSettings(await resp.json()) })
|
||||||
|
.catch((reason) => { alert(`Ошибка при применении настроек: ${reason}`) })
|
||||||
|
.finally(() => { this.submitStatus.cinc = false })
|
||||||
|
},
|
||||||
|
settingsSubmitBuclnb() {
|
||||||
|
if (this.submitStatus.buclnb) { return }
|
||||||
|
|
||||||
|
let query = {
|
||||||
|
"bucLnbAutoStart": this.paramBuclnb.bucLnbAutoStart,
|
||||||
|
"bucPowering": this.paramBuclnb.bucPowering,
|
||||||
|
"bucRefClk10M": this.paramBuclnb.bucRefClk10M,
|
||||||
|
"lnbPowering": this.paramBuclnb.lnbPowering,
|
||||||
|
"lnbRefClk10M": this.paramBuclnb.lnbRefClk10M,
|
||||||
|
"srvRefClk10M": this.paramBuclnb.srvRefClk10M,
|
||||||
|
}
|
||||||
|
|
||||||
|
this.submitStatus.buclnb = true
|
||||||
|
fetch('/api/set/buclnb', {method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify(query) })
|
||||||
|
.then(async (resp) => { this.updateBuclnbSettings(await resp.json()) })
|
||||||
|
.catch((reason) => { alert(`Ошибка при применении настроек: ${reason}`) })
|
||||||
|
.finally(() => { this.submitStatus.buclnb = false })
|
||||||
|
},
|
||||||
|
|
||||||
|
updateRxtxSettings(vals) {
|
||||||
|
this.submitStatus.rxtx = false
|
||||||
|
this.paramRxtx.isCinC = vals["settings"]["isCinC"]
|
||||||
|
this.paramRxtx.isCinC = vals["settings"]["isCinC"]
|
||||||
|
},
|
||||||
|
updateCincSettings(vals) {
|
||||||
|
this.submitStatus.cinc = false
|
||||||
|
this.paramCinc.cincIsPositional = vals["settings"]["cincIsPositional"]
|
||||||
|
this.paramCinc.cincSearchBandwidth = vals["settings"]["cincSearchBandwidth"]
|
||||||
|
},
|
||||||
|
updateBuclnbSettings(vals) {
|
||||||
|
this.submitStatus.buclnb = false
|
||||||
|
this.paramBuclnb.bucLnbAutoStart = vals["settings"]["bucLnbAutoStart"]
|
||||||
|
this.paramBuclnb.bucPowering = vals["settings"]["bucPowering"]
|
||||||
|
this.paramBuclnb.bucRefClk10M = vals["settings"]["bucRefClk10M"]
|
||||||
|
this.paramBuclnb.lnbPowering = vals["settings"]["lnbPowering"]
|
||||||
|
this.paramBuclnb.lnbRefClk10M = vals["settings"]["lnbRefClk10M"]
|
||||||
|
this.paramBuclnb.srvRefClk10M = vals["settings"]["srvRefClk10M"]
|
||||||
|
},
|
||||||
|
// ========== include end from 'common/all-params-methods.js.j2'
|
||||||
|
|
||||||
// ========== include from 'common/monitoring-methods.js.j2'
|
// ========== include from 'common/monitoring-methods.js.j2'
|
||||||
updateStatistics(vals) {
|
updateStatistics(vals) {
|
||||||
this.lastUpdateTime = new Date();
|
this.lastUpdateTime = new Date();
|
||||||
@ -583,95 +726,7 @@
|
|||||||
}, // ========== include end from 'common/monitoring-methods.js.j2'
|
}, // ========== include end from 'common/monitoring-methods.js.j2'
|
||||||
|
|
||||||
// ========== include from 'common/setup-methods.js.j2'
|
// ========== include from 'common/setup-methods.js.j2'
|
||||||
|
// ========== include end from 'common/setup-methods.js.j2'
|
||||||
settingsSubmitCinC() {
|
|
||||||
if (this.submitStatus.cinc) { return }
|
|
||||||
|
|
||||||
let query = {
|
|
||||||
"cinc.mode": this.param.cinc.mode,
|
|
||||||
"cinc.searchBandwidth": this.param.cinc.searchBandwidth,
|
|
||||||
"cinc.position.station.latitude": this.param.cinc.position.station.latitude,
|
|
||||||
"cinc.position.station.longitude": this.param.cinc.position.station.longitude,
|
|
||||||
"cinc.position.satelliteLongitude": this.param.cinc.position.satelliteLongitude,
|
|
||||||
"cinc.delayMin": this.param.cinc.delayMin,
|
|
||||||
"cinc.delayMax": this.param.cinc.delayMax
|
|
||||||
}
|
|
||||||
this.submitStatus.cinc = true
|
|
||||||
fetch('/api/set/cinc', {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
body: JSON.stringify(query)
|
|
||||||
}).then(async (resp) => {
|
|
||||||
this.submitStatus.cinc = false
|
|
||||||
this.updateCincSettings(await resp.json())
|
|
||||||
}).catch((reason) => {
|
|
||||||
this.submitStatus.cinc = false
|
|
||||||
alert(`Ошибка при применении настроек: ${reason}`)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
settingsSubmitBucLnb() {
|
|
||||||
if (this.submitStatus.bucLnb) { return }
|
|
||||||
let query = {
|
|
||||||
"buc.refClk10M": this.param.buc.refClk10M,
|
|
||||||
"buc.powering": parseInt(this.param.buc.powering),
|
|
||||||
"lnb.refClk10M": this.param.lnb.refClk10M,
|
|
||||||
"lnb.powering": parseInt(this.param.lnb.powering),
|
|
||||||
"serviceSettings.refClk10M": this.param.serviceSettings.refClk10M,
|
|
||||||
"serviceSettings.autoStart": this.param.serviceSettings.autoStart
|
|
||||||
}
|
|
||||||
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}`)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
updateCincSettings(vals) {
|
|
||||||
this.submitStatus.cinc = false
|
|
||||||
this.param.cinc.mode = vals["settings"]["cinc.mode"]
|
|
||||||
this.param.cinc.searchBandwidth = vals["settings"]["cinc.searchBandwidth"]
|
|
||||||
this.param.cinc.position.station.latitude = vals["settings"]["cinc.position.station.latitude"]
|
|
||||||
this.param.cinc.position.station.longitude = vals["settings"]["cinc.position.station.longitude"]
|
|
||||||
this.param.cinc.position.satelliteLongitude = vals["settings"]["cinc.position.satelliteLongitude"]
|
|
||||||
this.param.cinc.delayMin = vals["settings"]["cinc.delayMin"]
|
|
||||||
this.param.cinc.delayMax = vals["settings"]["cinc.delayMax"]
|
|
||||||
},
|
|
||||||
|
|
||||||
updateBucLnbSettings(vals) {
|
|
||||||
this.submitStatus.bucLnb = false
|
|
||||||
this.param.buc.refClk10M = vals["settings"]["buc.refClk10M"]
|
|
||||||
this.param.buc.powering = vals["settings"]["buc.powering"]
|
|
||||||
this.param.lnb.refClk10M = vals["settings"]["lnb.refClk10M"]
|
|
||||||
this.param.lnb.powering = vals["settings"]["lnb.powering"]
|
|
||||||
this.param.serviceSettings.refClk10M = vals["settings"]["serviceSettings.refClk10M"]
|
|
||||||
this.param.serviceSettings.autoStart = vals["settings"]["serviceSettings.autoStart"]
|
|
||||||
},
|
|
||||||
|
|
||||||
updateSettings(vals) {
|
|
||||||
this.settingFetchComplete = true
|
|
||||||
this.updateRxTxSettings(vals)
|
|
||||||
this.updateCincSettings(vals)
|
|
||||||
this.updateBucLnbSettings(vals)
|
|
||||||
this.updateQosSettings(vals)
|
|
||||||
this.updateNetworkSettings(vals)
|
|
||||||
this.updateDebugSendSettings(vals)
|
|
||||||
}, // ========== include end from 'common/setup-methods.js.j2'
|
|
||||||
|
|
||||||
// ========== include from 'common/qos-methods.js.j2'
|
// ========== include from 'common/qos-methods.js.j2'
|
||||||
settingsSubmitQoS() {
|
settingsSubmitQoS() {
|
||||||
|
@ -110,47 +110,100 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabs-body-item" v-if="activeTab === 'setup' && settingFetchComplete">
|
<div class="tabs-body-item" v-if="activeTab === 'setup' && settingFetchComplete">
|
||||||
<h2>Настройки приема/передачи</h2>
|
<h2>Настройки приема/передачи</h2>
|
||||||
<div class="tabs-item-flex-container">
|
<div class="tabs-item-flex-container">
|
||||||
<div class="settings-set-container">
|
<div class="settings-set-container">
|
||||||
<h3>Настройки передатчика</h3>
|
<h3>Настройки передатчика</h3>
|
||||||
<label>
|
<label>
|
||||||
<span>Включить передатчик</span>
|
<span>Включить передатчик</span>
|
||||||
<span class="toggle-input">
|
<span class="toggle-input"><input type="checkbox" v-model="paramRxtx.txEn" /><span class="slider"></span></span>
|
||||||
<input type="checkbox" v-model="paramRxtx.txEn" />
|
</label>
|
||||||
<span class="slider"></span>
|
<label>
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<span>Входные данные</span>
|
<span>Входные данные</span>
|
||||||
<select v-model="paramRxtx.txIsTestInput">
|
<select v-model="paramRxtx.txIsTestInput">
|
||||||
<option :value="true">Тест</option>
|
|
||||||
<option :value="false">SCPC</option>
|
<option :value="false">SCPC</option>
|
||||||
|
<option :value="true">Тест</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
<label><span>Центральная частота, КГц</span><input type="number" v-model="paramRxtx.txCentralFreq" min="900000" step="1"/></label>
|
||||||
|
<label><span>Символьная скорость, Бод</span><input type="number" v-model="paramRxtx.txBaudrate" step="1"/></label>
|
||||||
<div class="settings-set-container">
|
<label><span>Ослабление, дБ</span><input type="number" v-model="paramRxtx.txAttenuation" step="1"/></label>
|
||||||
<h3>Настройки приемника</h3>
|
</div>
|
||||||
<label>
|
<div class="settings-set-container">
|
||||||
|
<h3>Настройки приемника</h3>
|
||||||
|
<label>
|
||||||
<span>Режим управления усилением</span>
|
<span>Режим управления усилением</span>
|
||||||
<select v-model="paramRxtx.rxAgcEn">
|
<select v-model="paramRxtx.rxAgcEn">
|
||||||
<option :value="true">АРУ</option>
|
<option :value="true">АРУ</option>
|
||||||
<option :value="false">РРУ</option>
|
<option :value="false">РРУ</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<span>Инверсия спектра</span>
|
<span>Инверсия спектра</span>
|
||||||
<span class="toggle-input">
|
<span class="toggle-input"><input type="checkbox" v-model="paramRxtx.rxSpectrumInversion" /><span class="slider"></span></span>
|
||||||
<input type="checkbox" v-model="paramRxtx.rxSpectrumInversion" />
|
</label>
|
||||||
<span class="slider"></span>
|
<label v-show="!paramRxtx.rxAgcEn"><span>Ручное усиление, дБ</span><input type="number" v-model="paramRxtx.rxManualGain" min="-40"/></label>
|
||||||
</span>
|
<label><span>Центральная частота, КГц</span><input type="number" v-model="paramRxtx.rxCentralFreq" min="900000" step="1"/></label>
|
||||||
</label>
|
<label><span>Символьная скорость, Бод</span><input type="number" v-model="paramRxtx.rxBaudrate" step="1"/></label>
|
||||||
</div>
|
<label>
|
||||||
|
<span>Roll-off</span>
|
||||||
</div>
|
<select v-model="paramRxtx.rxRolloff">
|
||||||
|
<option :value="2">0.02</option>
|
||||||
<button class="action-button" @click="settingsSubmitBucLnb()">Сохранить <span class="submit-spinner" v-show="submitStatus.bucLnb"></span></button>
|
<option :value="5">0.05</option>
|
||||||
|
<option :value="10">0.10</option>
|
||||||
|
<option :value="15">0.15</option>
|
||||||
|
<option :value="20">0.20</option>
|
||||||
|
<option :value="25">0.25</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button class="action-button" @click="settingsSubmitRxtx()">Сохранить <span class="submit-spinner" v-show="submitStatus.rxtx"></span></button>
|
||||||
|
<h2>Настройки питания и опорного генератора</h2>
|
||||||
|
<div class="tabs-item-flex-container">
|
||||||
|
<div class="settings-set-container">
|
||||||
|
<h3>Настройки BUC</h3>
|
||||||
|
<label>
|
||||||
|
<span>Подача опоры 10МГц</span>
|
||||||
|
<span class="toggle-input"><input type="checkbox" v-model="paramBuclnb.bucRefClk10M" /><span class="slider"></span></span>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<span>Питание BUC</span>
|
||||||
|
<select v-model="paramBuclnb.bucPowering">
|
||||||
|
<option :value="0">Выкл</option>
|
||||||
|
<option :value="24">24В</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="settings-set-container">
|
||||||
|
<h3>Настройки LNB</h3>
|
||||||
|
<label>
|
||||||
|
<span>Подача опоры 10МГц</span>
|
||||||
|
<span class="toggle-input"><input type="checkbox" v-model="paramBuclnb.lnbRefClk10M" /><span class="slider"></span></span>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<span>Питание LNB</span>
|
||||||
|
<select v-model="paramBuclnb.lnbPowering">
|
||||||
|
<option :value="0">Выкл</option>
|
||||||
|
<option :value="13">13В</option>
|
||||||
|
<option :value="18">18В</option>
|
||||||
|
<option :value="24">24В</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="settings-set-container">
|
||||||
|
<h3>Сервисные настройки</h3>
|
||||||
|
<label>
|
||||||
|
<span>Подача опоры 10МГц на 'Выход 10МГц'</span>
|
||||||
|
<span class="toggle-input"><input type="checkbox" v-model="paramBuclnb.srvRefClk10M" /><span class="slider"></span></span>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<span>Автозапуск BUC и LNB при включении</span>
|
||||||
|
<span class="toggle-input"><input type="checkbox" v-model="paramBuclnb.bucLnbAutoStart" /><span class="slider"></span></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button class="action-button" @click="settingsSubmitBuclnb()">Сохранить <span class="submit-spinner" v-show="submitStatus.buclnb"></span></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabs-body-item" v-if="activeTab === 'admin' && settingFetchComplete">
|
<div class="tabs-body-item" v-if="activeTab === 'admin' && settingFetchComplete">
|
||||||
<h2>Настройки сети</h2>
|
<h2>Настройки сети</h2>
|
||||||
@ -398,6 +451,30 @@
|
|||||||
modemReboot: null
|
modemReboot: null
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// ========== include from 'common/all-params-data.js.j2'
|
||||||
|
paramRxtx: {
|
||||||
|
rxAgcEn: true,
|
||||||
|
rxBaudrate: 0,
|
||||||
|
rxCentralFreq: 900000,
|
||||||
|
rxManualGain: -40,
|
||||||
|
rxRolloff: 2,
|
||||||
|
rxSpectrumInversion: false,
|
||||||
|
txAttenuation: 0,
|
||||||
|
txBaudrate: 0,
|
||||||
|
txCentralFreq: 900000,
|
||||||
|
txEn: false,
|
||||||
|
txIsTestInput: false,
|
||||||
|
},
|
||||||
|
paramBuclnb: {
|
||||||
|
bucLnbAutoStart: false,
|
||||||
|
bucPowering: 0,
|
||||||
|
bucRefClk10M: false,
|
||||||
|
lnbPowering: 0,
|
||||||
|
lnbRefClk10M: false,
|
||||||
|
srvRefClk10M: false,
|
||||||
|
},
|
||||||
|
// ========== include end from 'common/all-params-data.js.j2'
|
||||||
|
|
||||||
// ========== include from 'common/monitoring-data.js.j2'
|
// ========== include from 'common/monitoring-data.js.j2'
|
||||||
statRx: {
|
statRx: {
|
||||||
// индикаторы
|
// индикаторы
|
||||||
@ -480,6 +557,75 @@
|
|||||||
return ""
|
return ""
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// ========== include from 'common/all-params-methods.js.j2'
|
||||||
|
settingsSubmitRxtx() {
|
||||||
|
if (this.submitStatus.rxtx) { return }
|
||||||
|
|
||||||
|
let query = {
|
||||||
|
"rxAgcEn": this.paramRxtx.rxAgcEn,
|
||||||
|
"rxBaudrate": this.paramRxtx.rxBaudrate,
|
||||||
|
"rxCentralFreq": this.paramRxtx.rxCentralFreq,
|
||||||
|
"rxManualGain": this.paramRxtx.rxManualGain,
|
||||||
|
"rxRolloff": this.paramRxtx.rxRolloff,
|
||||||
|
"rxSpectrumInversion": this.paramRxtx.rxSpectrumInversion,
|
||||||
|
"txAttenuation": this.paramRxtx.txAttenuation,
|
||||||
|
"txBaudrate": this.paramRxtx.txBaudrate,
|
||||||
|
"txCentralFreq": this.paramRxtx.txCentralFreq,
|
||||||
|
"txEn": this.paramRxtx.txEn,
|
||||||
|
"txIsTestInput": this.paramRxtx.txIsTestInput,
|
||||||
|
}
|
||||||
|
|
||||||
|
this.submitStatus.rxtx = true
|
||||||
|
fetch('/api/set/rxtx', {method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify(query) })
|
||||||
|
.then(async (resp) => { this.updateRxtxSettings(await resp.json()) })
|
||||||
|
.catch((reason) => { alert(`Ошибка при применении настроек: ${reason}`) })
|
||||||
|
.finally(() => { this.submitStatus.rxtx = false })
|
||||||
|
},
|
||||||
|
settingsSubmitBuclnb() {
|
||||||
|
if (this.submitStatus.buclnb) { return }
|
||||||
|
{ if (!confirm("Применение неправильных настроек может вывести из строя оборудование! Продолжить?")) return }
|
||||||
|
|
||||||
|
let query = {
|
||||||
|
"bucLnbAutoStart": this.paramBuclnb.bucLnbAutoStart,
|
||||||
|
"bucPowering": this.paramBuclnb.bucPowering,
|
||||||
|
"bucRefClk10M": this.paramBuclnb.bucRefClk10M,
|
||||||
|
"lnbPowering": this.paramBuclnb.lnbPowering,
|
||||||
|
"lnbRefClk10M": this.paramBuclnb.lnbRefClk10M,
|
||||||
|
"srvRefClk10M": this.paramBuclnb.srvRefClk10M,
|
||||||
|
}
|
||||||
|
|
||||||
|
this.submitStatus.buclnb = true
|
||||||
|
fetch('/api/set/buclnb', {method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify(query) })
|
||||||
|
.then(async (resp) => { this.updateBuclnbSettings(await resp.json()) })
|
||||||
|
.catch((reason) => { alert(`Ошибка при применении настроек: ${reason}`) })
|
||||||
|
.finally(() => { this.submitStatus.buclnb = false })
|
||||||
|
},
|
||||||
|
|
||||||
|
updateRxtxSettings(vals) {
|
||||||
|
this.submitStatus.rxtx = false
|
||||||
|
this.paramRxtx.rxAgcEn = vals["settings"]["rxAgcEn"]
|
||||||
|
this.paramRxtx.rxBaudrate = vals["settings"]["rxBaudrate"]
|
||||||
|
this.paramRxtx.rxCentralFreq = vals["settings"]["rxCentralFreq"]
|
||||||
|
this.paramRxtx.rxManualGain = vals["settings"]["rxManualGain"]
|
||||||
|
this.paramRxtx.rxRolloff = vals["settings"]["rxRolloff"]
|
||||||
|
this.paramRxtx.rxSpectrumInversion = vals["settings"]["rxSpectrumInversion"]
|
||||||
|
this.paramRxtx.txAttenuation = vals["settings"]["txAttenuation"]
|
||||||
|
this.paramRxtx.txBaudrate = vals["settings"]["txBaudrate"]
|
||||||
|
this.paramRxtx.txCentralFreq = vals["settings"]["txCentralFreq"]
|
||||||
|
this.paramRxtx.txEn = vals["settings"]["txEn"]
|
||||||
|
this.paramRxtx.txIsTestInput = vals["settings"]["txIsTestInput"]
|
||||||
|
},
|
||||||
|
updateBuclnbSettings(vals) {
|
||||||
|
this.submitStatus.buclnb = false
|
||||||
|
this.paramBuclnb.bucLnbAutoStart = vals["settings"]["bucLnbAutoStart"]
|
||||||
|
this.paramBuclnb.bucPowering = vals["settings"]["bucPowering"]
|
||||||
|
this.paramBuclnb.bucRefClk10M = vals["settings"]["bucRefClk10M"]
|
||||||
|
this.paramBuclnb.lnbPowering = vals["settings"]["lnbPowering"]
|
||||||
|
this.paramBuclnb.lnbRefClk10M = vals["settings"]["lnbRefClk10M"]
|
||||||
|
this.paramBuclnb.srvRefClk10M = vals["settings"]["srvRefClk10M"]
|
||||||
|
},
|
||||||
|
// ========== include end from 'common/all-params-methods.js.j2'
|
||||||
|
|
||||||
// ========== include from 'common/monitoring-methods.js.j2'
|
// ========== include from 'common/monitoring-methods.js.j2'
|
||||||
updateStatistics(vals) {
|
updateStatistics(vals) {
|
||||||
this.lastUpdateTime = new Date();
|
this.lastUpdateTime = new Date();
|
||||||
@ -545,95 +691,7 @@
|
|||||||
}, // ========== include end from 'common/monitoring-methods.js.j2'
|
}, // ========== include end from 'common/monitoring-methods.js.j2'
|
||||||
|
|
||||||
// ========== include from 'common/setup-methods.js.j2'
|
// ========== include from 'common/setup-methods.js.j2'
|
||||||
|
// ========== include end from 'common/setup-methods.js.j2'
|
||||||
settingsSubmitCinC() {
|
|
||||||
if (this.submitStatus.cinc) { return }
|
|
||||||
|
|
||||||
let query = {
|
|
||||||
"cinc.mode": this.param.cinc.mode,
|
|
||||||
"cinc.searchBandwidth": this.param.cinc.searchBandwidth,
|
|
||||||
"cinc.position.station.latitude": this.param.cinc.position.station.latitude,
|
|
||||||
"cinc.position.station.longitude": this.param.cinc.position.station.longitude,
|
|
||||||
"cinc.position.satelliteLongitude": this.param.cinc.position.satelliteLongitude,
|
|
||||||
"cinc.delayMin": this.param.cinc.delayMin,
|
|
||||||
"cinc.delayMax": this.param.cinc.delayMax
|
|
||||||
}
|
|
||||||
this.submitStatus.cinc = true
|
|
||||||
fetch('/api/set/cinc', {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
body: JSON.stringify(query)
|
|
||||||
}).then(async (resp) => {
|
|
||||||
this.submitStatus.cinc = false
|
|
||||||
this.updateCincSettings(await resp.json())
|
|
||||||
}).catch((reason) => {
|
|
||||||
this.submitStatus.cinc = false
|
|
||||||
alert(`Ошибка при применении настроек: ${reason}`)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
settingsSubmitBucLnb() {
|
|
||||||
if (this.submitStatus.bucLnb) { return }
|
|
||||||
let query = {
|
|
||||||
"buc.refClk10M": this.param.buc.refClk10M,
|
|
||||||
"buc.powering": parseInt(this.param.buc.powering),
|
|
||||||
"lnb.refClk10M": this.param.lnb.refClk10M,
|
|
||||||
"lnb.powering": parseInt(this.param.lnb.powering),
|
|
||||||
"serviceSettings.refClk10M": this.param.serviceSettings.refClk10M,
|
|
||||||
"serviceSettings.autoStart": this.param.serviceSettings.autoStart
|
|
||||||
}
|
|
||||||
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}`)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
updateCincSettings(vals) {
|
|
||||||
this.submitStatus.cinc = false
|
|
||||||
this.param.cinc.mode = vals["settings"]["cinc.mode"]
|
|
||||||
this.param.cinc.searchBandwidth = vals["settings"]["cinc.searchBandwidth"]
|
|
||||||
this.param.cinc.position.station.latitude = vals["settings"]["cinc.position.station.latitude"]
|
|
||||||
this.param.cinc.position.station.longitude = vals["settings"]["cinc.position.station.longitude"]
|
|
||||||
this.param.cinc.position.satelliteLongitude = vals["settings"]["cinc.position.satelliteLongitude"]
|
|
||||||
this.param.cinc.delayMin = vals["settings"]["cinc.delayMin"]
|
|
||||||
this.param.cinc.delayMax = vals["settings"]["cinc.delayMax"]
|
|
||||||
},
|
|
||||||
|
|
||||||
updateBucLnbSettings(vals) {
|
|
||||||
this.submitStatus.bucLnb = false
|
|
||||||
this.param.buc.refClk10M = vals["settings"]["buc.refClk10M"]
|
|
||||||
this.param.buc.powering = vals["settings"]["buc.powering"]
|
|
||||||
this.param.lnb.refClk10M = vals["settings"]["lnb.refClk10M"]
|
|
||||||
this.param.lnb.powering = vals["settings"]["lnb.powering"]
|
|
||||||
this.param.serviceSettings.refClk10M = vals["settings"]["serviceSettings.refClk10M"]
|
|
||||||
this.param.serviceSettings.autoStart = vals["settings"]["serviceSettings.autoStart"]
|
|
||||||
},
|
|
||||||
|
|
||||||
updateSettings(vals) {
|
|
||||||
this.settingFetchComplete = true
|
|
||||||
this.updateRxTxSettings(vals)
|
|
||||||
this.updateCincSettings(vals)
|
|
||||||
this.updateBucLnbSettings(vals)
|
|
||||||
this.updateQosSettings(vals)
|
|
||||||
this.updateNetworkSettings(vals)
|
|
||||||
this.updateDebugSendSettings(vals)
|
|
||||||
}, // ========== include end from 'common/setup-methods.js.j2'
|
|
||||||
|
|
||||||
// ========== include from 'common/admin-methods.js.j2'
|
// ========== include from 'common/admin-methods.js.j2'
|
||||||
settingsSubmitNetwork() {
|
settingsSubmitNetwork() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user