summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-06-05 14:14:43 +0800
committerJose Lausuch <jose.lausuch@ericsson.com>2017-06-06 13:20:14 +0000
commit462b86646cd4fc6c4885790e99218aa52a56283d (patch)
tree1f1da2c33471e934d969617feb0a3f368078f50b /testapi/opnfv_testapi
parent4cae17a7c8587740f206a2500d0aa8dfe0b5f904 (diff)
show community results
show latest 20 results in cummunity results page. Because pagination is not supported, pagination related buttons are forbiddened now Change-Id: I3d94fc1b89845b6583dd40fe86d69407adfd2e6c Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testapi/opnfv_testapi')
-rw-r--r--testapi/opnfv_testapi/resources/result_handlers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/testapi/opnfv_testapi/resources/result_handlers.py b/testapi/opnfv_testapi/resources/result_handlers.py
index 214706f..b84d1e3 100644
--- a/testapi/opnfv_testapi/resources/result_handlers.py
+++ b/testapi/opnfv_testapi/resources/result_handlers.py
@@ -47,7 +47,7 @@ class GenericResultHandler(handlers.GenericApiHandler):
query['start_date'] = obj
elif k == 'trust_indicator':
query[k + '.current'] = float(v)
- elif k != 'last':
+ elif k != 'last' and k != 'page':
query[k] = v
return query
@@ -126,6 +126,10 @@ class ResultsCLHandler(GenericResultHandler):
if last is not None:
last = self.get_int('last', last)
+ page = self.get_query_argument('page', 0)
+ if page:
+ last = 20
+
self._list(query=self.set_query(),
sort=[('start_date', -1)],
last=last)