if ("undefined" == typeof (XMLHttpRequest.responseJSON)) {
if ("undefined" == typeof (XMLHttpRequest.responseJSON)) {
alert("System error, please try again later.");
layer.alert("System error, please try again later.");
return;
return;
}
}
@ -81,14 +82,12 @@
$(".layui-body").load(pageUrl);
$(".layui-body").load(pageUrl);
}
}
function check_lan(ip)
function check_lan(ip) {
{
var re = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5]):([0-9]|[1-9]\d{1,3}|[1-5]\d{4}|6[0-5]{2}[0-3][0-5])$/
var re = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5]):([0-9]|[1-9]\d{1,3}|[1-5]\d{4}|6[0-5]{2}[0-3][0-5])$/
return re.test(ip);
return re.test(ip);
}
}
function check_port(port)
function check_port(port) {
{
if (port > 65535) {
if (port > 65535) {
return false;
return false;
}
}
@ -114,20 +113,20 @@
History.pushState('forward', null, '?state=1');
History.pushState('forward', null, '?state=1');
}
}
load_page("html/client/list.html");
$(".logout").click(function() {
$(".logout").click(function() {
api_invoke("/logout", {}, function(data) {
api_invoke("/logout", {}, function(data) {
location.href = "/";
location.href = "/";
})
})
});
});
window.clientList = [];
});
});
function update_menu() {
function update_menu() {
api_invoke("/config/detail", {}, function(data) {
api_invoke("/config/detail", {}, function(data) {
if (data.code == 20000) {
if (data.code == 20000) {
clientList = data.data;
clientList = data.data;
var html = template($("#menu-tpl").html(), {list: clientList});