mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
@@ -716,6 +716,8 @@ def getLogsList():
|
||||
spider_type = args['spider_type']
|
||||
query_date = args['query_date']
|
||||
search_uri = args['search_uri']
|
||||
referer = args['referer']
|
||||
ip = args['ip']
|
||||
setDefaultSite(domain)
|
||||
|
||||
limit = str(page_size) + ' offset ' + str(page_size * (page - 1))
|
||||
@@ -726,6 +728,15 @@ def getLogsList():
|
||||
conn = conn.field(field)
|
||||
conn = conn.where("1=1", ())
|
||||
|
||||
if referer != 'all':
|
||||
if referer == '1':
|
||||
conn = conn.andWhere("referer <> ? ", ('',))
|
||||
elif referer == '-1':
|
||||
conn = conn.andWhere("referer is null ", ())
|
||||
|
||||
if ip != '':
|
||||
conn = conn.andWhere("ip=?", (ip,))
|
||||
|
||||
if method != "all":
|
||||
conn = conn.andWhere("method=?", (method,))
|
||||
|
||||
@@ -761,6 +772,7 @@ def getLogsList():
|
||||
attacHistoryLogHack(conn, domain, query_date)
|
||||
|
||||
clist = conn.limit(limit).order('time desc').inquiry()
|
||||
# print(clist)
|
||||
count_key = "count(*) as num"
|
||||
count = conn.field(count_key).limit('').order('').inquiry()
|
||||
# print(count)
|
||||
|
||||
@@ -2170,12 +2170,14 @@ function wsTableLogRequest(page){
|
||||
|
||||
var args = {};
|
||||
args['page'] = page;
|
||||
args['page_size'] = 10;
|
||||
args['page_size'] = 9;
|
||||
|
||||
args['site'] = $('select[name="site"]').val();
|
||||
args['method'] = $('select[name="method"]').val();
|
||||
args['status_code'] = $('select[name="status_code"]').val();
|
||||
args['spider_type'] = $('select[name="spider_type"]').val();
|
||||
args['referer'] = $('select[name="referer"]').val();
|
||||
args['ip'] = $('input[name="ip"]').val();
|
||||
|
||||
var query_date = 'today';
|
||||
if ($('#time_choose').attr("data-name") != ''){
|
||||
@@ -2370,6 +2372,12 @@ var html = '<div>\
|
||||
<option value="404">404</option>\
|
||||
<option value="200">200</option>\
|
||||
</select>\
|
||||
<span style="margin-left:10px;">来源: </span>\
|
||||
<select class="bt-input-text" name="referer" style="margin-left:4px">\
|
||||
<option value="all">所有</option>\
|
||||
<option value="-1">无</option>\
|
||||
<option value="1">有</option>\
|
||||
</select>\
|
||||
<span style="margin-left:10px;">蜘蛛过滤: </span>\
|
||||
<select class="bt-input-text" name="spider_type" style="margin-left:4px">\
|
||||
<option value="normal">不过滤</option>\
|
||||
@@ -2388,7 +2396,13 @@ var html = '<div>\
|
||||
<option value="11">一搜</option>\
|
||||
<option value="12">其他</option>\
|
||||
</select>\
|
||||
<span style="margin-left:10px;">URL过滤: </span>\
|
||||
<span>IP: </span>\
|
||||
<div class="input-group" style="width:163px;display:inline-flex;">\
|
||||
<input type="text" name="ip" class="form-control btn-group-sm" autocomplete="off" placeholder="IP地址" style="font-size: 12px;padding: 0 10px;height:30px;">\
|
||||
</div>\
|
||||
</div>\
|
||||
<div style="padding-bottom:10px;">\
|
||||
<span>URL过滤: </span>\
|
||||
<div class="input-group" style="width:210px;display:inline-flex;">\
|
||||
<input type="text" name="search_uri" class="form-control btn-group-sm" autocomplete="off" placeholder="URI搜索" style="font-size: 12px;padding: 0 10px;height:30px;">\
|
||||
<div class="input-group-btn btn-group-sm">\
|
||||
|
||||
Reference in New Issue
Block a user