рабочая генерация всех полей на вкладке настроек и Qos, осталось администрирование
This commit is contained in:
@@ -63,18 +63,24 @@
|
||||
<script>
|
||||
const availableTabs = ['{{ tab_names_array | join("', '") }}']
|
||||
|
||||
{% include 'default-js.js' %}
|
||||
// для обновления высоты хидера
|
||||
function updateHeaderHeight() { const header = document.querySelector('header'); document.body.style.setProperty('--header-height', `${header.offsetHeight}px`); }
|
||||
window.addEventListener('load', updateHeaderHeight); window.addEventListener('resize', updateHeaderHeight);
|
||||
|
||||
function getCurrentTab() {
|
||||
const sl = window.location.hash.slice(1)
|
||||
if (availableTabs.indexOf(sl) >= 0) {
|
||||
return sl
|
||||
}
|
||||
return availableTabs[0]
|
||||
}
|
||||
|
||||
const app = Vue.createApp({
|
||||
data() {
|
||||
return {
|
||||
{% if modem == 'scpc' %}
|
||||
isCinC: false,
|
||||
{% endif %}
|
||||
|
||||
// false - означает что статистика не отправляется, true - отправляется
|
||||
submitStatus: {
|
||||
{% for pg in params.paramGroupsList %}
|
||||
{% for pg in paramGroupsList %}
|
||||
{{ pg }}: false,
|
||||
{% endfor %}
|
||||
firmwareUpload: false,
|
||||
@@ -132,6 +138,21 @@
|
||||
}
|
||||
return ""
|
||||
},
|
||||
getAvailableModcods(modulation) {
|
||||
// NOTE модкоды со скоростью хода 3/5 не работают
|
||||
switch (modulation) {
|
||||
case 'qpsk':
|
||||
return ['1/4', '1/3', '2/5', '1/2', '3/5', '2/3', '3/4', '4/5', '5/6', '8/9', '9/10']
|
||||
case '8psk':
|
||||
return ['3/5', '2/3', '3/4', '5/6', '8/9', '9/10']
|
||||
case '16apsk':
|
||||
return ['2/3', '3/4', '4/5', '5/6', '8/9', '9/10']
|
||||
case '32apsk':
|
||||
return ['3/4', '4/5', '5/6', '8/9', '9/10']
|
||||
default:
|
||||
return []
|
||||
}
|
||||
},
|
||||
|
||||
// ========== include from 'common/all-params-methods.js.j2'
|
||||
{% include 'common/all-params-methods.js.j2' %}
|
||||
@@ -149,9 +170,12 @@
|
||||
let d = await fetch("/api/get/settings")
|
||||
let vals = await d.json()
|
||||
this.settingFetchComplete = true
|
||||
{% for pg in params.paramGroupsList %}
|
||||
{% for pg in paramGroupsList %}
|
||||
this.update{{ pg | capitalize }}Settings(vals)
|
||||
{% endfor %}
|
||||
{% if 'qos' in tab_names_array %}
|
||||
this.updateQosSettings(vals)
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
doFetchSettings().then(() => {})
|
||||
|
Reference in New Issue
Block a user