关键字日志转url配置bug更改

批量失效时http关键字配置失效,同时失效相关的httpurl配置
刘梦严要求行为只保留pptp openvpn ipsec l2tp
This commit is contained in:
段冬梅
2018-12-10 20:23:19 +08:00
parent e19b168af9
commit a09341f8d7
5 changed files with 78 additions and 20 deletions

View File

@@ -50,73 +50,72 @@ $(function () {
$("#httpUrl tbody tr").eq(i).find("td").eq(1).attr("title",urls[i]);
$("#httpUrl tbody tr").eq(i).find("td").eq(1)
.append(url);
$("#httpUrl tbody tr").eq(i).find("td").eq(2).append(
$("select[name='service']").clone()
$("#http_url_modal").find("select[name='service']").clone()
.attr("name",prefixName+"action")
.removeClass("hidden")
);
$("#httpUrl tbody tr").eq(i).find("td").eq(2).append(
$("input[name='serviceId']").clone()
$("#http_url_modal").find("input[name='serviceId']").clone()
.attr("name",prefixName+"serviceId")
.attr("value","6")
);
$("#httpUrl tbody tr").eq(i).find("td").eq(2).append(
$("input[name='cfgType']").clone()
$("#http_url_modal").find("input[name='cfgType']").clone()
.attr("name",prefixName+"cfgType")
);
$("#httpUrl tbody tr").eq(i).find("td").eq(2).append(
$("input[name='cfgRegionCode']").clone()
$("#http_url_modal").find("input[name='cfgRegionCode']").clone()
.attr("name",prefixName+"cfgRegionCode")
);
$("#httpUrl tbody tr").eq(i).find("td").eq(2).append(
$("input[name='serviceId']").clone()
$("#http_url_modal").find("input[name='serviceId']").clone()
.attr("name",prefixName+"functionId")
.attr("value","6")
);
$("#httpUrl tbody tr").eq(i).find("td").eq(3).append(
$("select[name='doLog']").clone()
$("#http_url_modal").find("select[name='doLog']").clone()
.attr("name",prefixName+"doLog")
.removeClass("hidden")
);
$("#httpUrl tbody tr").eq(i).find("td").eq(4).append(
$("select[name='exprType']").clone()
$("#http_url_modal").find("select[name='exprType']").clone()
.attr("name",prefixName+"exprType")
.removeClass("hidden")
);
$("#httpUrl tbody tr").eq(i).find("td").eq(5).append(
$("select[name='matchMethod']").clone()
$("#http_url_modal").find("select[name='matchMethod']").clone()
.attr("name",prefixName+"matchMethod")
.removeClass("hidden")
);
$("#httpUrl tbody tr").eq(i).find("td").eq(6).append(
$("input[name='isHexbin']").clone()
$("#http_url_modal").find("input[name='isHexbin']").clone()
.attr("name",prefixName+"isHexbin")
);
$("#httpUrl tbody tr").eq(i).find("td").eq(7).append(
$("input[name='requestId']").clone()
$("#http_url_modal").find("input[name='requestId']").clone()
.attr("name",prefixName+"requestId")
);
$("#httpUrl tbody tr").eq(i).find("td").eq(7).append(
$("input[name='classify']").clone()
$("#http_url_modal").find("input[name='classify']").clone()
.attr("name",prefixName+"classify")
);
$("#httpUrl tbody tr").eq(i).find("td").eq(7).append(
$("input[name='attribute']").clone()
$("#http_url_modal").find("input[name='attribute']").clone()
.attr("name",prefixName+"attribute")
);
$("#httpUrl tbody tr").eq(i).find("td").eq(7).append(
$("input[name='lable']").clone()
$("#http_url_modal").find("input[name='lable']").clone()
.attr("name",prefixName+"lable")
);
$("#httpUrl tbody tr").eq(i).find("td").eq(8).append(
$("input[name='isAreaEffective']").clone()
$("#http_url_modal").find("input[name='isAreaEffective']").clone()
.attr("name",prefixName+"isAreaEffective")
);
$("#httpUrl tbody tr").eq(i).find("td").eq(9).append(
$("input[name='sourceCompileId']").clone()
$("#http_url_modal").find("input[name='sourceCompileId']").clone()
.attr("name",prefixName+"sourceCompileId")
.attr("value",compileIds[i])
);
@@ -128,9 +127,9 @@ $(function () {
});
}
$("select").selectpicker("refresh");
$("#http_url_modal").find("select").selectpicker("refresh");
$("select[name$='.action']").each(function(){
$("#http_url_modal").find("select[name$='.action']").each(function(){
var action=$(this).val();
var objNamePrefix=$(this).attr("name").split("action")[0];
$(this).on("change", function() {
@@ -142,7 +141,7 @@ $(function () {
$("input[name='"+objNamePrefix+"cfgType']").attr("value",$("#httpUrlRegion").val());
$("input[name='"+objNamePrefix+"cfgRegionCode']").attr("value",$("#httpUrlRegion").attr("cfgRegionCode"));
}
if(action == 1){ //白名单
if(action == 1){
$("select[name='"+objNamePrefix+"doLog']").attr("value",1);
$("select[name='"+objNamePrefix+"doLog']").attr("disabled",true);
$("select[name='"+objNamePrefix+"doLog']").selectpicker("refresh");
@@ -159,7 +158,7 @@ $(function () {
$("input[name='"+objNamePrefix+"cfgType']").attr("value",$("#httpUrlRegion").val());
$("input[name='"+objNamePrefix+"cfgRegionCode']").attr("value",$("#httpUrlRegion").attr("cfgRegionCode"));
}
if(action == 1){ //白名单
if(action == 1){
$("select[name='"+objNamePrefix+"doLog']").attr("value",1);
$("select[name='"+objNamePrefix+"doLog']").attr("disabled",true);
$("select[name='"+objNamePrefix+"doLog']").selectpicker("refresh");