...
|
...
|
@@ -82,7 +82,14 @@ |
|
|
<span class="input-group-addon" style="height:34px;width:40px;"></span>
|
|
|
<input type="checkbox" id="checkAll" class="form-control" style="margin-top:7px;margin-left:-30px;width:20px;height:20px;" onclick="checkAll()" />
|
|
|
</div>
|
|
|
<button id="uploadIps" class="btn-primary" style="margin-left: 80px;" onclick="batchDeleteIPs()">批量删除
|
|
|
<button id="uploadIps" class="btn-primary" style="margin-left: 10px;" onclick="batchDeleteIPs()">批量删除
|
|
|
</button>
|
|
|
</div>
|
|
|
|
|
|
<div class="form-inline" role="form" style=" margin-top: 12px;margin-left: 55px;float: left;">
|
|
|
|
|
|
<input id="newIps" class="form-control" placeholder="需要封杀恶意ip" />
|
|
|
<button class="btn-danger" style="margin-left: 10px;" onclick="addIPs()">添加
|
|
|
</button>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -204,6 +211,36 @@ |
|
|
|
|
|
}
|
|
|
|
|
|
function addIPs() {
|
|
|
var mip=$("#newIps").val();
|
|
|
mip=$.trim(mip);
|
|
|
if(mip==null||mip.length<=0){
|
|
|
alert("请录入ip信息");
|
|
|
return ;
|
|
|
}
|
|
|
if(confirm("是否确定要封杀如下ip:\r\n" + mip)){
|
|
|
$.ajax({
|
|
|
url: contextPath + "maliciousIp/addMipsFromOpsRedis",
|
|
|
type: "post",
|
|
|
dataType: "json",
|
|
|
data: {
|
|
|
ip: mip
|
|
|
},
|
|
|
success: function (response) {
|
|
|
if(200==response.code){
|
|
|
refreshTable();
|
|
|
localAlert("提示",response.data);
|
|
|
}else{
|
|
|
alert("发生错误:"+response.message);
|
|
|
}
|
|
|
},
|
|
|
error: function (e) {
|
|
|
alert("封杀恶意ip发生异常");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//全选
|
|
|
function checkAll(){
|
|
|
$("#ipTable input[type='checkbox']").each(function(){
|
...
|
...
|
|