if ("undefined" == typeof (XMLHttpRequest.responseJSON)) {
layer.alert("System error, please try again later.");
return;
}
if(40100 == XMLHttpRequest.responseJSON.code){
location.href="/";
}else{
layer.alert(XMLHttpRequest.responseJSON.message);
api_invoke("/config/detail", {}, function(data) {
clientList = data.data;
});
}
}
});
}
if (40100 == XMLHttpRequest.responseJSON.code) {
location.href = "/";
} else {
layer.alert(XMLHttpRequest.responseJSON.message);
api_invoke("/config/detail", {}, function(data) {
clientList = data.data;
});
}
}
});
}
function load_page(pageUrl) {
$(".layui-body").load(pageUrl);
}
function load_page(pageUrl) {
$(".layui-body").load(pageUrl);
}
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])$/
return re.test(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])$/
return re.test(ip);
}
function check_port(port)
{
if (port>65535) {
return false;
}
var re = /^[1-9]+[0-9]*]*$/
return re.test(port);
}
function check_port(port) {
if (port > 65535) {
return false;
}
var re = /^[1-9]+[0-9]*]*$/
return re.test(port);
}
$(function() {
if (window.history && window.history.pushState) {
$(window).on('popstate', function() {
window.history.pushState('forward', null, '#');
window.history.forward(1);
});
}
if ('pushState' in history) {
window.history.pushState('forward', null, '#');
window.history.forward(1);
} else {
History.pushState('forward', null, '?state=2');
window.history.forward(1);
}
window.onhashchange = function() {
History.pushState('forward', null, '?state=1');
}
$(function() {
if (window.history && window.history.pushState) {
$(window).on('popstate', function() {
window.history.pushState('forward', null, '#');
window.history.forward(1);
});
}
if ('pushState' in history) {
window.history.pushState('forward', null, '#');
window.history.forward(1);
} else {
History.pushState('forward', null, '?state=2');
window.history.forward(1);
}
window.onhashchange = function() {
History.pushState('forward', null, '?state=1');
}
load_page("html/client/list.html");
$(".logout").click(function(){
api_invoke("/logout", {}, function(data){
location.href = "/";
})
});
$(".logout").click(function() {
api_invoke("/logout", {}, function(data) {
location.href = "/";
})
});
window.clientList = [];
});
function update_menu(){
});
function update_menu() {
api_invoke("/config/detail", {}, function(data) {
if (data.code == 20000) {
clientList = data.data;
var html = template($("#menu-tpl").html(), {list: clientList});