From d96bf32a81e1c109c87013db5799940c0f9d726b 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 'utils/test/testapi/3rd_party') diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/components/results/resultsController.js b/utils/test/testapi/3rd_party/static/testapi-ui/components/results/resultsController.js index 93a549a7f..9e3540da5 100644 --- a/utils/test/testapi/3rd_party/static/testapi-ui/components/results/resultsController.js +++ b/utils/test/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