|
|
<%--
|
|
|
CreateUser: xuhui
|
|
|
CreateDate: 2017/3/20
|
|
|
--%>
|
|
|
<%@ page import="org.aspectj.weaver.ast.Var" %>
|
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
|
|
pageEncoding="UTF-8" %>
|
|
|
<%
|
|
|
String path = request.getContextPath();
|
|
|
String basePath = request.getScheme() + "://"
|
|
|
+ request.getServerName() + ":" + request.getServerPort()
|
|
|
+ path + "/";
|
|
|
%>
|
|
|
<html>
|
|
|
<head>
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/bootstrap.min.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/unicorn.main.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/unicorn.grey.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/jquery-ui.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/bootstrap-responsive.min.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/uniform.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/select2.css"/>
|
|
|
<script src="<%=basePath %>js/excanvas.min.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/jquery-1.12.0.min.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/jquery-ui.custom.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>/js/bootstrap.min.js"></script>
|
|
|
<script src="<%=basePath %>/js/unicorn.js"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/datetimepicker/moment-with-locales.js" charset="UTF-8"
|
|
|
type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/datetimepicker/bootstrap-datetimepicker.js" charset="UTF-8"
|
|
|
type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/global.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.pagination.js" charset="UTF-8"
|
|
|
type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.table.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.dialog.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.form.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.panel.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.alerts.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.accordion.js" charset="UTF-8"
|
|
|
type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.breadcrumb.js" charset="UTF-8"
|
|
|
type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.validate.js" charset="UTF-8"
|
|
|
type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.form.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/layer/layer.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.select.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/jstree/jstree.min.js"></script>
|
|
|
<script src="<%=basePath %>js/jquery.toaster.js"></script>
|
|
|
<script>
|
|
|
var contextPath = '<%=basePath %>';
|
|
|
</script>
|
|
|
<title>YOHO!运维</title>
|
|
|
</head>
|
|
|
<body>
|
|
|
<!-- 头部 -->
|
|
|
<div id="head">
|
|
|
</div>
|
|
|
|
|
|
<!-- 右侧具体内容 -->
|
|
|
<div id="content">
|
|
|
|
|
|
<div id="breadcrumb">
|
|
|
<a href="#" title="Go to Home" class="tip-bottom"><i
|
|
|
class="icon-home"></i> Home</a> <a href="#" class="current">被封杀的恶意请求ip集合</a>
|
|
|
</div>
|
|
|
|
|
|
<div class="container-fluid">
|
|
|
<div class="widget-box">
|
|
|
<div class="widget-title">
|
|
|
<h5>恶意ip top</h5>
|
|
|
</div>
|
|
|
|
|
|
<div class="widget-title" style="height: 56px;">
|
|
|
<div>
|
|
|
<div class="form-inline" role="form" id="inBoxQueryDiv" style=" margin-top: 12px;margin-left: 25px;float: left;">
|
|
|
|
|
|
<div class="input-group" style="float: left">
|
|
|
<span class="input-group-addon" style="height:34px;">全选:</span>
|
|
|
<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>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div id="ipTable" style="overflow-y: auto; overflow-x:hidden;max-height: 700px" /></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</body>
|
|
|
<script src="<%=basePath %>js/pagination.js"></script>
|
|
|
<script src="<%=basePath %>script/common/genarate_left_panel.js"></script>
|
|
|
<script>
|
|
|
$("#li_config").addClass("active open");
|
|
|
$("#li_malicious_ips").addClass("active");
|
|
|
</script>
|
|
|
</html>
|
|
|
|
|
|
<script>
|
|
|
$(function () {
|
|
|
refreshTable();
|
|
|
});
|
|
|
|
|
|
function refreshTable() {
|
|
|
$("#ipTable").table({
|
|
|
url: contextPath + "maliciousIp/getMipsFromOpsReids",
|
|
|
dataType: 'json',
|
|
|
striped: true,
|
|
|
panelClass: "panel-success",
|
|
|
loadFilter: function (data) {
|
|
|
return defaultLoadFilter(data);
|
|
|
},
|
|
|
columns: [
|
|
|
{
|
|
|
title: "",
|
|
|
width:"20px",
|
|
|
field: "ip",
|
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
var div = $("<div>");
|
|
|
//复选框
|
|
|
var checkBox = $("<input name='checkType' type='checkbox' value='"+value+"'>").addClass("ckbox-default").appendTo(div);
|
|
|
return div;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: "ip",
|
|
|
width: "100px",
|
|
|
field: "ip"
|
|
|
},
|
|
|
{
|
|
|
title: "操作",
|
|
|
width: "50px",
|
|
|
field: "ip",
|
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
var div = $("<div>");
|
|
|
//移除
|
|
|
var editBtn = $("<button data-toggle='modal'>").addClass("btn btn-xs btn-warning").html("移除").appendTo(div);
|
|
|
editBtn.click(function () {
|
|
|
removeMips(rowData.ip);
|
|
|
});
|
|
|
return div;
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function removeMips(mip){
|
|
|
if(confirm("是否确定要删除如下ip:\r\n" + mip)){
|
|
|
$.ajax({
|
|
|
url: contextPath + "maliciousIp/delMipsFromOpsRedis",
|
|
|
type: "post",
|
|
|
dataType: "json",
|
|
|
data: {
|
|
|
ip: mip
|
|
|
},
|
|
|
success: function (response) {
|
|
|
if(200==response.code){
|
|
|
refreshTable();
|
|
|
}else{
|
|
|
alert("发生错误:"+response.message);
|
|
|
}
|
|
|
},
|
|
|
error: function (e) {
|
|
|
alert("移除恶意ip发生异常");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//全选
|
|
|
function checkAll(){
|
|
|
$("#ipTable input[type='checkbox']").each(function(){
|
|
|
if($("#checkAll").is(':checked'))
|
|
|
$(this).prop("checked", true);
|
|
|
else
|
|
|
$(this).prop("checked", false);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function batchDeleteIPs(){
|
|
|
var listip = "";
|
|
|
$("#ipTable input[type='checkbox']:checked").each(function(){
|
|
|
listip += $(this).val() + ",";
|
|
|
});
|
|
|
if(listip.length == 0){
|
|
|
alert("请至少选择一条数据");
|
|
|
return;
|
|
|
}
|
|
|
removeMips(listip);
|
|
|
}
|
|
|
</script> |
|
|
\ No newline at end of file |
...
|
...
|
|