|
@@ -97,7 +97,7 @@ function fadeIn(el, display){
|
|
function formValidation(){
|
|
function formValidation(){
|
|
$('validation-box').innerHTML = '';
|
|
$('validation-box').innerHTML = '';
|
|
var read_community,write_community,managerIP,managerIP2,managerIP3,managerIP4,managerIP5,
|
|
var read_community,write_community,managerIP,managerIP2,managerIP3,managerIP4,managerIP5,
|
|
- ipaddr, gw, mask, tn_port, wtl_ip1, wtl_ip2, wtl_ip3, wtl_ip4, wtl_ip5, ups_cell_min, ups_cell_max/*, ntpservip*/;
|
|
|
|
|
|
+ ipaddr, gw, mask, tn_port, syslog_port, syslog_server, wtl_ip1, wtl_ip2, wtl_ip3, wtl_ip4, wtl_ip5, ups_cell_min, ups_cell_max/*, ntpservip*/;
|
|
|
|
|
|
read_community = $('read_community');
|
|
read_community = $('read_community');
|
|
write_community = $('write_community');
|
|
write_community = $('write_community');
|
|
@@ -110,6 +110,8 @@ function formValidation(){
|
|
gw = $('gw');
|
|
gw = $('gw');
|
|
mask = $('mask');
|
|
mask = $('mask');
|
|
tn_port = $('tn_port');
|
|
tn_port = $('tn_port');
|
|
|
|
+ syslog_port = $('syslog_port');
|
|
|
|
+ syslog_server = $('syslog_server');
|
|
// ssh_port = $('ssh_port');
|
|
// ssh_port = $('ssh_port');
|
|
wtl_ip1 = $('wtl_ip1');
|
|
wtl_ip1 = $('wtl_ip1');
|
|
wtl_ip2 = $('wtl_ip2');
|
|
wtl_ip2 = $('wtl_ip2');
|
|
@@ -129,6 +131,10 @@ 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 ($('syslog_enable').checked) {
|
|
|
|
+ if(!ValidateNumber(syslog_port, ' Порт Syslog')) flag = false;
|
|
|
|
+ if(!ValidateIPaddress(syslog_server, ' Сервер Syslog')) flag = false;
|
|
|
|
+ }
|
|
// if ($('ssh_enabled').checked) {
|
|
// if ($('ssh_enabled').checked) {
|
|
// if(!ValidateNumber(ssh_port, ' Порт SSH')) flag = false;
|
|
// if(!ValidateNumber(ssh_port, ' Порт SSH')) flag = false;
|
|
// }
|
|
// }
|
|
@@ -370,6 +376,15 @@ function telnetState() {
|
|
$('tn_port').removeAttribute('disabled');
|
|
$('tn_port').removeAttribute('disabled');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+function syslogState() {
|
|
|
|
+ if (!$('syslog_enable').checked) {
|
|
|
|
+ $('syslog_server').setAttribute('disabled', 'disabled');
|
|
|
|
+ $('syslog_port').setAttribute('disabled', 'disabled');
|
|
|
|
+ } else {
|
|
|
|
+ $('syslog_server').removeAttribute('disabled');
|
|
|
|
+ $('syslog_port').removeAttribute('disabled');
|
|
|
|
+ }
|
|
|
|
+}
|
|
// function sshState() {
|
|
// function sshState() {
|
|
// if (!$('ssh_enabled').checked) {
|
|
// if (!$('ssh_enabled').checked) {
|
|
// $('ssh_port').setAttribute('disabled', 'disabled');
|
|
// $('ssh_port').setAttribute('disabled', 'disabled');
|
|
@@ -868,6 +883,10 @@ function settingsGET(){
|
|
$('managerIP3').value = data.managerIP3;
|
|
$('managerIP3').value = data.managerIP3;
|
|
$('managerIP4').value = data.managerIP4;
|
|
$('managerIP4').value = data.managerIP4;
|
|
$('managerIP5').value = data.managerIP5;
|
|
$('managerIP5').value = data.managerIP5;
|
|
|
|
+ // Syslog
|
|
|
|
+ $('syslog_enable').checked = data.syslog_enable;
|
|
|
|
+ $('syslog_server').value = data.syslog_server;
|
|
|
|
+ $('syslog_port').value = data.syslog_port;
|
|
// Network params
|
|
// Network params
|
|
$('ipaddr').value = data.ipaddr;
|
|
$('ipaddr').value = data.ipaddr;
|
|
$('gw').value = data.gw;
|
|
$('gw').value = data.gw;
|
|
@@ -984,6 +1003,7 @@ function settingsGET(){
|
|
$('ntp').value = data.ntp;
|
|
$('ntp').value = data.ntp;
|
|
dhcpState();
|
|
dhcpState();
|
|
telnetState();
|
|
telnetState();
|
|
|
|
+ syslogState();
|
|
timesetType($('ntp'));
|
|
timesetType($('ntp'));
|
|
|
|
|
|
window.setCookie('netsettings_changed', data.netsettings_changed);
|
|
window.setCookie('netsettings_changed', data.netsettings_changed);
|