Authored by qinchao

恶意ip

@@ -98,6 +98,25 @@ @@ -98,6 +98,25 @@
98 <div id="ipTable" style="overflow-y: auto; overflow-x:hidden;max-height: 700px" /></div> 98 <div id="ipTable" style="overflow-y: auto; overflow-x:hidden;max-height: 700px" /></div>
99 </div> 99 </div>
100 </div> 100 </div>
  101 +
  102 +<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  103 + <div class="modal-dialog">
  104 + <div class="modal-content" style="width: 140%">
  105 + <div class="modal-header">
  106 + <button type="button" class="close" data-dismiss="modal"
  107 + aria-hidden="true">&times;</button>
  108 + <h4 class="modal-title" id="myModalLabel"></h4>
  109 + </div>
  110 + <div class="modal-body">
  111 + <input id="hbasePrefix"type="text" readonly disabled style="width:350px;" />
  112 + <div id="hbaseTable" style="overflow-y: auto; overflow-x:hidden;max-height: 700px" /></div>
  113 + </div>
  114 + <div class="modal-footer">
  115 + <button type="button" class="btn btn-danger" data-dismiss="modal">关闭</button>
  116 + </div>
  117 + </div>
  118 +</div>
  119 +
101 </body> 120 </body>
102 <script src="<%=basePath %>js/pagination.js"></script> 121 <script src="<%=basePath %>js/pagination.js"></script>
103 <script src="<%=basePath %>script/common/genarate_left_panel.js"></script> 122 <script src="<%=basePath %>script/common/genarate_left_panel.js"></script>
@@ -202,6 +221,8 @@ @@ -202,6 +221,8 @@
202 editBtn.click(function () { 221 editBtn.click(function () {
203 removeMips(rowData.ip); 222 removeMips(rowData.ip);
204 }); 223 });
  224 + div.append("&nbsp;");
  225 + $("<button onclick=\"qpsDetailMip(\'" + rowData.ip +"\'"+ ","+"\'"+rowData.hbaseTime+"\')\">").addClass("btn btn-xs btn-info").html("详情").appendTo(div);
205 return div; 226 return div;
206 }, 227 },
207 styler : function(value, rowData, rowIndex){ 228 styler : function(value, rowData, rowIndex){
@@ -213,6 +234,39 @@ @@ -213,6 +234,39 @@
213 }); 234 });
214 } 235 }
215 236
  237 + function qpsDetailMip(mip,hbaseTime){
  238 + if(!hbaseTime){
  239 + hbaseTime=0;
  240 + }
  241 +
  242 + $("#hbasePrefix").val(mip+":"+hbaseTime+":");
  243 + $("#hbaseTable").table({
  244 + url: contextPath + "maliciousIp/getMaliciousDetection",
  245 + queryParams:{
  246 + ip:mip,
  247 + timestamp:hbaseTime,
  248 + type:"alarm"
  249 + },
  250 + dataType: 'json',
  251 + striped: true,
  252 + pagination: false,
  253 + //pageSize: 10,
  254 + //sortName: 'count', // 设置默认排序为 name
  255 + //sortOrder: 'desc', // 设置排序为反序 desc
  256 + panelClass: "panel-success",
  257 + loadFilter: function (data) {
  258 + return defaultLoadFilter(data);
  259 + },
  260 + columns: [
  261 + {
  262 + title: "内容",
  263 + field: "reason",
  264 + width: "100%"
  265 + }]
  266 + });
  267 + $("#myModal").modal('show');
  268 + }
  269 +
216 function showResons(elememt){ 270 function showResons(elememt){
217 var that = elememt; 271 var that = elememt;
218 var btnText = $(that).attr("value"); 272 var btnText = $(that).attr("value");
@@ -119,7 +119,7 @@ @@ -119,7 +119,7 @@
119 </div> 119 </div>
120 </div> 120 </div>
121 </div> 121 </div>
122 -</div> 122 +
123 </body> 123 </body>
124 <script src="<%=basePath %>script/common/genarate_left_panel.js"></script> 124 <script src="<%=basePath %>script/common/genarate_left_panel.js"></script>
125 125