diff --git a/plugins/op_waf/js/op_waf.js b/plugins/op_waf/js/op_waf.js index 537085a09..1714402a4 100755 --- a/plugins/op_waf/js/op_waf.js +++ b/plugins/op_waf/js/op_waf.js @@ -76,6 +76,95 @@ function setCcRule(cycle, limit, endtime, siteName, increase){ incstr = '
  • 此处设置的是初始值,新添加站点时将继承,对现有站点无效。
  • '; } + // get_aicc_config(function(res){ + var enhance_mode = ''; + // if(res.status){ + // enhance_mode = 2; + // }else{ + if(increase){ + enhance_mode = 1; + }else{ + enhance_mode = 0; + } + // } + create_l = layer.open({ + type: 1, + title: "设置CC规则", + area: '540px', + closeBtn: 2, + shadeClose: false, + content: '
    \ +
    \ + 周期\ +
    \ +
    \ +
    \ + 频率\ +
    \ +
    \ +
    \ + 封锁时间\ +
    \ +
    \ +
    \ + 增强模式\ +
    \ + \ +
    \ +
    \ +
    \ + 四层防御\ +
    \ + \ +
    \ +
    \ + \ +
    \ +
    ', + success:function(layero,index){ + // console.log(siteName == 'undefined'); + // //\ + // if($('[name="enhance_mode"]').val() == 2 && siteName != 'undefined'){ + // $('[name="enhance_mode"]').attr('disabled','disabled'); + // } + // get_stop_ip(function(rdata){ + // $('[name="cc_four_defense"]').val(rdata.status?'1':'0'); + // }); + // $('[name="cc_four_defense"]').change(function(){ + // var _val = $(this).val(); + // if(_val == '0'){ + // set_stop_ip_stop(function(res){ + // layer.msg(res.msg,{icon:res.status?1:2}); + // }); + // }else{ + // set_stop_ip(function(res){ + // layer.msg(res.msg,{icon:res.status?1:2}); + // }); + // } + // }); + // $('.btn_cc_all').click(function(){ + // save_cc_rule(siteName,1,$('[name="enhance_mode"]').val()); + // layer.close(index); + // }); + // $('.btn_cc_present').click(function(){ + // save_cc_rule(siteName,0,$('[name="enhance_mode"]').val()); + // layer.close(index); + // }); + } + }); + // }); + } function wafScreen(){ @@ -133,7 +222,14 @@ function wafGloabl(){ \ \ \ - 初始规则\ + 初始规则\ + \ + \ + 恶意容忍度\ + 封锁连续恶意请求,请到站点配置中调整容忍阈值\ + ' + rdata.cc.status + '\ + --\ + 初始规则\ \ \ \