修改区域详情查看bug,区域信息查看修改为click事件
tagINput增加非空校验
This commit is contained in:
@@ -247,92 +247,19 @@ $(function(){
|
||||
}
|
||||
});
|
||||
/*=====关键字与表达式处理 结束=====*/
|
||||
|
||||
$("a[name=viewAreaInfo]").hover(function(){
|
||||
var areaEffectiveIds=$(this).attr("areaEffectiveIds");
|
||||
var compileId=$(this).attr("compileId");
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'ajaxAreaEffictiveInfo',
|
||||
data:{"areaEffectiveIds":areaEffectiveIds,"compileId":compileId},
|
||||
dataType:'json',
|
||||
async:false,
|
||||
success:function(data,textStatus){
|
||||
if(textStatus=="success"){
|
||||
var html = "";
|
||||
var title="";
|
||||
if(data.areaIsps.length > 0){
|
||||
title=$.validator.messages.area+" "+$.validator.messages.isp;
|
||||
html+="<table class='table table-striped table-bordered table-condensed' style='margin-left: 10px; width: 96%;'>";
|
||||
html+="<thead>";
|
||||
html+="<th>"+$.validator.messages.area+"</th>" +
|
||||
"<th>"+$.validator.messages.isp+"</th>";
|
||||
html+="</thead>";
|
||||
html+="<tbody>";
|
||||
for(i=0;i<data.areaIsps.length;i++){
|
||||
html+="<tr>";
|
||||
html+="<td>"+data.areaIsps[i].areaName;
|
||||
html+="</td>";
|
||||
html+="<td>"+data.areaIsps[i].ispName;
|
||||
html+="</td>";
|
||||
html+="</tr>";
|
||||
}
|
||||
html+="</tbody>";
|
||||
html+="</table>";
|
||||
}
|
||||
if(data.areaIps.length > 0){
|
||||
title=$.validator.messages.area+" ip";
|
||||
html+="<table class='table table-striped table-bordered table-condensed' style='margin-left: 10px; width: 96%;'>";
|
||||
html+="<thead>";
|
||||
html+="<th>"+$.validator.messages.ip_type+"</th>" +
|
||||
"<th>"+$.validator.messages.ip_pattern+"</th>" +
|
||||
"<th>"+$.validator.messages.client_ip+"</th>";
|
||||
html+="</thead>";
|
||||
html+="<tbody>";
|
||||
for(i=0;i<data.areaIps.length;i++){
|
||||
html+="<tr>";
|
||||
html+="<td>";
|
||||
if(data.areaIps[i].ipType==4){
|
||||
html+=$.validator.messages.ipv4;
|
||||
}
|
||||
if(data.areaIps[i].ipType==6){
|
||||
html+=$.validator.messages.ipv6;
|
||||
}
|
||||
if(data.areaIps[i].ipType==46){
|
||||
html+=$.validator.messages.over4;
|
||||
}
|
||||
if(data.areaIps[i].ipType==64){
|
||||
html+=$.validator.messages.over6;
|
||||
}
|
||||
if(data.areaIps[i].ipType==10){
|
||||
html+=$.validator.messages.all;
|
||||
}
|
||||
html+="</td>";
|
||||
html+="<td>";
|
||||
if(data.areaIps[i].ipPattern==1){
|
||||
html+=$.validator.messages.ip_subnet;
|
||||
}
|
||||
if(data.areaIps[i].ipPattern==2){
|
||||
html+=$.validator.messages.ip_range;
|
||||
}
|
||||
if(data.areaIps[i].ipPattern==3){
|
||||
html+="IP";
|
||||
}
|
||||
html+="</td>";
|
||||
html+="<td>"+data.areaIps[i].srcIpAddress;
|
||||
html+="</td>";
|
||||
html+="</tr>";
|
||||
}
|
||||
html+="</tbody>";
|
||||
html+="</table>";
|
||||
}
|
||||
top.$.jBox(html,{width: $(document).width()*0.4,height: 400,title:title, buttons:false});
|
||||
}
|
||||
|
||||
/*$("input[name$='cfgKeywords']").each(function(){
|
||||
if($(this).hasClass("tags")){
|
||||
if($(this).val()==''){
|
||||
$(this).parents(".form-group").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
|
||||
flag = false;
|
||||
return;
|
||||
}
|
||||
|
||||
});
|
||||
},function(){});
|
||||
}
|
||||
})*/
|
||||
|
||||
});
|
||||
var switchIpType=function(obj){
|
||||
var type=$(obj).val();
|
||||
@@ -570,7 +497,89 @@ var more=function(obj){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var viewAreaInfo=function(path,areaEffectiveIds,compileId){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:path+'/ntc/av/area/ajaxAreaEffictiveInfo',
|
||||
data:{"areaEffectiveIds":areaEffectiveIds,"compileId":compileId},
|
||||
dataType:'json',
|
||||
async:false,
|
||||
success:function(data,textStatus){
|
||||
if(textStatus=="success"){
|
||||
var html = "";
|
||||
var title="";
|
||||
if(data.areaIsps.length > 0){
|
||||
title=$.validator.messages.area+" "+$.validator.messages.isp;
|
||||
html+="<table class='table table-striped table-bordered table-condensed' style='margin-left: 10px; width: 96%;'>";
|
||||
html+="<thead>";
|
||||
html+="<th>"+$.validator.messages.area+"</th>" +
|
||||
"<th>"+$.validator.messages.isp+"</th>";
|
||||
html+="</thead>";
|
||||
html+="<tbody>";
|
||||
for(i=0;i<data.areaIsps.length;i++){
|
||||
html+="<tr>";
|
||||
html+="<td>"+data.areaIsps[i].areaName;
|
||||
html+="</td>";
|
||||
html+="<td>"+data.areaIsps[i].ispName;
|
||||
html+="</td>";
|
||||
html+="</tr>";
|
||||
}
|
||||
html+="</tbody>";
|
||||
html+="</table>";
|
||||
}
|
||||
if(data.areaIps.length > 0){
|
||||
title=$.validator.messages.area+" ip";
|
||||
html+="<table class='table table-striped table-bordered table-condensed' style='margin-left: 10px; width: 96%;'>";
|
||||
html+="<thead>";
|
||||
html+="<th>"+$.validator.messages.ip_type+"</th>" +
|
||||
"<th>"+$.validator.messages.ip_pattern+"</th>" +
|
||||
"<th>"+$.validator.messages.client_ip+"</th>";
|
||||
html+="</thead>";
|
||||
html+="<tbody>";
|
||||
for(i=0;i<data.areaIps.length;i++){
|
||||
html+="<tr>";
|
||||
html+="<td>";
|
||||
if(data.areaIps[i].ipType==4){
|
||||
html+=$.validator.messages.ipv4;
|
||||
}
|
||||
if(data.areaIps[i].ipType==6){
|
||||
html+=$.validator.messages.ipv6;
|
||||
}
|
||||
if(data.areaIps[i].ipType==46){
|
||||
html+=$.validator.messages.over4;
|
||||
}
|
||||
if(data.areaIps[i].ipType==64){
|
||||
html+=$.validator.messages.over6;
|
||||
}
|
||||
if(data.areaIps[i].ipType==10){
|
||||
html+=$.validator.messages.all;
|
||||
}
|
||||
html+="</td>";
|
||||
html+="<td>";
|
||||
if(data.areaIps[i].ipPattern==1){
|
||||
html+=$.validator.messages.ip_subnet;
|
||||
}
|
||||
if(data.areaIps[i].ipPattern==2){
|
||||
html+=$.validator.messages.ip_range;
|
||||
}
|
||||
if(data.areaIps[i].ipPattern==3){
|
||||
html+="IP";
|
||||
}
|
||||
html+="</td>";
|
||||
html+="<td>"+data.areaIps[i].srcIpAddress;
|
||||
html+="</td>";
|
||||
html+="</tr>";
|
||||
}
|
||||
html+="</tbody>";
|
||||
html+="</table>";
|
||||
}
|
||||
top.$.jBox(html,{width: $(document).width()*0.4,height: 400,title:title, buttons:false});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
//删除区域IP
|
||||
function delAreaIp(obj){
|
||||
var thisObj=$(obj);
|
||||
|
||||
Reference in New Issue
Block a user