You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spot.apache.org by le...@apache.org on 2017/07/04 00:10:29 UTC

incubator-spot git commit: Added filter parameters to proxy edge query

Repository: incubator-spot
Updated Branches:
  refs/heads/SPOT-35_graphql_api 4150a72bd -> 883030973


Added filter parameters to proxy edge query


Project: http://git-wip-us.apache.org/repos/asf/incubator-spot/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spot/commit/88303097
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spot/tree/88303097
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spot/diff/88303097

Branch: refs/heads/SPOT-35_graphql_api
Commit: 883030973445e223e21def3d10c1c3be7e54747b
Parents: 4150a72
Author: LedaLima <le...@apache.org>
Authored: Mon Jul 3 18:35:31 2017 -0500
Committer: LedaLima <ga...@intel.com>
Committed: Mon Jul 3 19:09:55 2017 -0500

----------------------------------------------------------------------
 spot-oa/api/resources/proxy.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/88303097/spot-oa/api/resources/proxy.py
----------------------------------------------------------------------
diff --git a/spot-oa/api/resources/proxy.py b/spot-oa/api/resources/proxy.py
index 0ca8608..7b63d8b 100644
--- a/spot-oa/api/resources/proxy.py
+++ b/spot-oa/api/resources/proxy.py
@@ -48,7 +48,7 @@ Return list(dict) of all the connectios details for one request.
 def details(date,uri,ip):
 
     if not uri and not ip:
-	return None
+        return None
 
     db = Configuration.db()
     p_details = ("""
@@ -59,8 +59,9 @@ def details(date,uri,ip):
 		FROM
 		    {0}.proxy_edge
 		WHERE
-		    y={1} AND m={2} AND d={3}
-		""").format(db,date.year,date.month,date.day)
+		    y={1} AND m={2} AND d={3} AND 
+            (fulluri='{4}' AND clientIp='{5}')
+		""").format(db,date.year,date.month,date.day,uri.replace("'","//'"),ip)
     return ImpalaEngine.execute_query_as_list(p_details)
 
 """