feature: добавил поле для ввода пароля входа в сеть ЦЗС
This commit is contained in:
@@ -122,7 +122,6 @@
|
||||
{
|
||||
"widget": "settings-container",
|
||||
"childs": [
|
||||
{"widget": "text", "label": "Пароль для входа в сеть ЦЗС", "name": "cesPassword"},
|
||||
{"widget": "h3", "label": "Настройки интерфейса управления"},
|
||||
{"widget": "ip-address-mask", "label": "Интерфейс управления (a.d.d.r/mask)", "name": "managementIp"},
|
||||
{"widget": "text", "label": "Имя веб-сервера", "name": "serverName"}
|
||||
|
@@ -63,6 +63,22 @@
|
||||
}
|
||||
this.submitStatus.firmwareUpgradeOta = false
|
||||
},
|
||||
async settingsPerformSetCesPassword() {
|
||||
if (this.submitStatus.cesPassword) { return }
|
||||
this.submitStatus.cesPassword = true
|
||||
try {
|
||||
await fetch('/api/set/cesPassword', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({'password': this.cesPasswordValue})
|
||||
})
|
||||
} catch (e) {
|
||||
console.log("failed to perform set CES password: ", e)
|
||||
}
|
||||
this.submitStatus.cesPassword = false
|
||||
},
|
||||
{% endif %}
|
||||
|
||||
doModemReboot() {
|
||||
|
@@ -23,7 +23,16 @@
|
||||
</div>
|
||||
<button class="action-button" @click="dumpAllSettings()">Сохранить бекап конфигурации</button>
|
||||
<button class="dangerous-button" @click="restoreAllSettings()">Восстановить бекап конфигурации</button>
|
||||
</div>
|
||||
</div>{% endraw %}{% if modem == 'tdma' %}
|
||||
|
||||
<h2>Вход в сеть ЦЗС</h2>
|
||||
<div class="settings-set-container statistics-container">
|
||||
<label>
|
||||
<span>Хеш-строка пароля (выдается оператором NMS)</span>
|
||||
<input v-model="cesPasswordValue" type="text">
|
||||
</label>
|
||||
<button class="action-button" @click="settingsPerformSetCesPassword()">Установить пароль<span class="submit-spinner" v-show="submitStatus.cesPassword"></span></button>
|
||||
</div>{% endif %}{% raw %}
|
||||
|
||||
<h2>Обновление ПО</h2>
|
||||
<div class="settings-set-container statistics-container">
|
||||
|
@@ -99,10 +99,14 @@
|
||||
firmwareUpgrade: false,
|
||||
{% if modem == 'tdma' %}
|
||||
firmwareUpgradeOta: false,
|
||||
cesPassword: false,
|
||||
{% endif %}
|
||||
// когда модем перезагружается, тут должен быть счетчик. Направление счета - к нулю
|
||||
modemReboot: null
|
||||
},
|
||||
{% if modem == 'tdma' %}
|
||||
cesPasswordValue: '',
|
||||
{% endif %}
|
||||
|
||||
// ========== include from 'common/all-params-data.js.j2'
|
||||
{% include 'common/all-params-data.js.j2' %}
|
||||
|
Reference in New Issue
Block a user