From b87da1f862c1966dba0c60cb5368b86bb698104e Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Tue, 20 Jun 2017 17:40:38 +0800 Subject: support pagination in TestAPI In this patch, pagination is supported, so you can go through results leveraging: http://testresults.opnfv.org/test/api/v1/results?page=2 Change-Id: Ibe31c787643f27dbb06c4899e713b3c8e716e784 Signed-off-by: SerenaFeng --- .../static/testapi-ui/components/results/resultsController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testapi/3rd_party') diff --git a/testapi/3rd_party/static/testapi-ui/components/results/resultsController.js b/testapi/3rd_party/static/testapi-ui/components/results/resultsController.js index 93a549a..9e3540d 100644 --- a/testapi/3rd_party/static/testapi-ui/components/results/resultsController.js +++ b/testapi/3rd_party/static/testapi-ui/components/results/resultsController.js @@ -123,8 +123,8 @@ ctrl.resultsRequest = $http.get(content_url).success(function (data) { ctrl.data = data; - ctrl.totalItems = 20 // ctrl.data.pagination.total_pages * ctrl.itemsPerPage; - ctrl.currentPage = 1 // ctrl.data.pagination.current_page; + ctrl.totalItems = ctrl.data.pagination.total_pages * ctrl.itemsPerPage; + ctrl.currentPage = ctrl.data.pagination.current_page; }).error(function (error) { ctrl.data = null; ctrl.totalItems = 0; -- cgit 1.2.3-korg