Ver Fonte

remove ssh settings from the bt6711 web

Avetisyan Karen há 4 anos atrás
pai
commit
3116e1c887

BIN
web_interface/dist/wui-11/main.js


BIN
web_interface/dist/wui-11/settings.html


+ 22 - 22
web_interface/src/wui-11/main.js

@@ -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 &&

+ 2 - 2
web_interface/src/wui-11/settings.html

@@ -164,7 +164,7 @@
         <input type="text" class="form-control" id="tn_port" name="tn_port">
         <input type="text" class="form-control" id="tn_port" name="tn_port">
       </div>
       </div>
     </div>
     </div>
-    <div class="col span_1_of_2">
+<!--     <div class="col span_1_of_2">
       <h4 class="col span_2_of_2">SSH</h4>
       <h4 class="col span_2_of_2">SSH</h4>
       <div class="checkbox col span_2_of_2">
       <div class="checkbox col span_2_of_2">
         <span style="color:#f0ad4e">При смене данных параметров контроллер будет перезагружен.</span><br />
         <span style="color:#f0ad4e">При смене данных параметров контроллер будет перезагружен.</span><br />
@@ -176,7 +176,7 @@
       <div class="col span_1_of_2">
       <div class="col span_1_of_2">
         <input type="text" class="form-control" id="ssh_port" name="ssh_port">
         <input type="text" class="form-control" id="ssh_port" name="ssh_port">
       </div>
       </div>
-    </div>
+    </div> -->
   </div>
   </div>
 </div>
 </div>
 <div id="whitelist" class="tabpane">
 <div id="whitelist" class="tabpane">