|
@@ -110,7 +110,7 @@ function formValidation(){
|
|
gw = $('gw');
|
|
gw = $('gw');
|
|
mask = $('mask');
|
|
mask = $('mask');
|
|
tn_port = $('tn_port');
|
|
tn_port = $('tn_port');
|
|
- ssh_port = $('ssh_port');
|
|
|
|
|
|
+ // ssh_port = $('ssh_port');
|
|
wtl_ip1 = $('wtl_ip1');
|
|
wtl_ip1 = $('wtl_ip1');
|
|
wtl_ip2 = $('wtl_ip2');
|
|
wtl_ip2 = $('wtl_ip2');
|
|
wtl_ip3 = $('wtl_ip3');
|
|
wtl_ip3 = $('wtl_ip3');
|
|
@@ -129,17 +129,17 @@ function formValidation(){
|
|
if ($('tn_enabled').checked) {
|
|
if ($('tn_enabled').checked) {
|
|
if(!ValidateNumber(tn_port, ' Порт Telnet')) flag = false;
|
|
if(!ValidateNumber(tn_port, ' Порт Telnet')) flag = false;
|
|
}
|
|
}
|
|
- if ($('ssh_enabled').checked) {
|
|
|
|
- if(!ValidateNumber(ssh_port, ' Порт SSH')) flag = false;
|
|
|
|
- }
|
|
|
|
- if ($('ssh_enabled').checked && $('tn_enabled').checked) {
|
|
|
|
- if (ssh_port.value == tn_port.value) {
|
|
|
|
- var warn = document.createElement('li');
|
|
|
|
- warn.innerHTML = 'Одинаковые поты Telnet и SSH!';
|
|
|
|
- $('validation-box').appendChild(warn);
|
|
|
|
- flag = false;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ // if ($('ssh_enabled').checked) {
|
|
|
|
+ // if(!ValidateNumber(ssh_port, ' Порт SSH')) flag = false;
|
|
|
|
+ // }
|
|
|
|
+ // if ($('ssh_enabled').checked && $('tn_enabled').checked) {
|
|
|
|
+ // if (ssh_port.value == tn_port.value) {
|
|
|
|
+ // var warn = document.createElement('li');
|
|
|
|
+ // warn.innerHTML = 'Одинаковые поты Telnet и SSH!';
|
|
|
|
+ // $('validation-box').appendChild(warn);
|
|
|
|
+ // flag = false;
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
if(ups_cell_min > ups_cell_max) {
|
|
if(ups_cell_min > ups_cell_max) {
|
|
var warn = document.createElement('li');
|
|
var warn = document.createElement('li');
|
|
warn.innerHTML = 'Минимальное напряжение на ячейке не может быть больше максимального!';
|
|
warn.innerHTML = 'Минимальное напряжение на ячейке не может быть больше максимального!';
|
|
@@ -370,13 +370,13 @@ function telnetState() {
|
|
$('tn_port').removeAttribute('disabled');
|
|
$('tn_port').removeAttribute('disabled');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-function sshState() {
|
|
|
|
- if (!$('ssh_enabled').checked) {
|
|
|
|
- $('ssh_port').setAttribute('disabled', 'disabled');
|
|
|
|
- } else {
|
|
|
|
- $('ssh_port').removeAttribute('disabled');
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
+// function sshState() {
|
|
|
|
+// if (!$('ssh_enabled').checked) {
|
|
|
|
+// $('ssh_port').setAttribute('disabled', 'disabled');
|
|
|
|
+// } else {
|
|
|
|
+// $('ssh_port').removeAttribute('disabled');
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
|
|
//########## Info Form Validation ############
|
|
//########## Info Form Validation ############
|
|
|
|
|
|
@@ -902,8 +902,8 @@ function settingsGET(){
|
|
|
|
|
|
$('tn_enabled').checked = data.tn_enabled;
|
|
$('tn_enabled').checked = data.tn_enabled;
|
|
$('tn_port').value = data.tn_port;
|
|
$('tn_port').value = data.tn_port;
|
|
- $('ssh_enabled').checked = data.ssh_enabled;
|
|
|
|
- $('ssh_port').value = data.ssh_port;
|
|
|
|
|
|
+ // $('ssh_enabled').checked = data.ssh_enabled;
|
|
|
|
+ // $('ssh_port').value = data.ssh_port;
|
|
$("bat_prod").value = data.bat_prod;
|
|
$("bat_prod").value = data.bat_prod;
|
|
ups_max_power = new SpinBox('ups_max_power', {
|
|
ups_max_power = new SpinBox('ups_max_power', {
|
|
'value': data.ups_max_power,
|
|
'value': data.ups_max_power,
|
|
@@ -949,7 +949,7 @@ function settingsGET(){
|
|
'maximum':240,
|
|
'maximum':240,
|
|
'step':12
|
|
'step':12
|
|
});
|
|
});
|
|
- sshState();
|
|
|
|
|
|
+ // sshState();
|
|
// DateTime
|
|
// DateTime
|
|
if (data.ntpservip != $('ntpservip').options[0].value &&
|
|
if (data.ntpservip != $('ntpservip').options[0].value &&
|
|
data.ntpservip != $('ntpservip').options[1].value &&
|
|
data.ntpservip != $('ntpservip').options[1].value &&
|