summaryrefslogtreecommitdiffstats
path: root/utils/test/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
commit2603d107bf15ab0d48417f7c948f7aeba057563b (patch)
tree0b82f508c1bb66834898c736726d6d9c304d4f1b /utils/test/testapi/opnfv_testapi
parent5405777dc08714eadf8020c9f9b6a8dfcbf7d48c (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 'utils/test/testapi/opnfv_testapi')
-rw-r--r--utils/test/testapi/opnfv_testapi/resources/result_handlers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/test/testapi/opnfv_testapi/resources/result_handlers.py b/utils/test/testapi/opnfv_testapi/resources/result_handlers.py
index 214706f5f..b84d1e3c2 100644
--- a/utils/test/testapi/opnfv_testapi/resources/result_handlers.py
+++ b/utils/test/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)