Commit 60d1bf7e by lyh3024

fix

Change-Id: Iaf58046ff879e3c25f51169bd7407a3930907b89
parent 7ec8ca56
......@@ -37,7 +37,7 @@ def get_request_ips(label, from_time, end_time):
'where l.label_name = $label and req.date >= $from_time and req.date <= $end_time return r.request_ip'
else:
param = {"label": label}
query = 'match (r:RequestIp)-[]->(d:DomainName)-[]->(l:Label) where l.label_name = $label return r'
query = 'match (r:RequestIp)-[]->(d:DomainName)-[]->(l:Label) where l.label_name = $label return r.request_ip'
nodes = db.cypher_query(query, param)[0]
ips = [node[0] for node in nodes]
else:
......@@ -76,6 +76,7 @@ def get_domain_list(request):
resp = tools.dec_success_resp({"nodes": resp_nodes, "relations": resp_relations})
return JsonResponse(resp, safe=False)
print(ips)
param = {"ips": ips}
query = 'match (r:RequestIp)-[req:REQUEST]->(d:DomainName)-[lab:LABEL]->(l:Label), (dns:DnsIp)-[par:PARSE]->(d)' \
'where r.request_ip in $ips return r, d, l, dns, req, lab, par'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment