From 4ca8f9bc1b74ce826b36f0d44233679bfc5ce8f9 Mon Sep 17 00:00:00 2001 From: thuva4 Date: Fri, 16 Mar 2018 15:29:44 +0530 Subject: Change deatails in result page to dynamic Change the static code of the show details in the result page to dynamic JIRA: RELENG-358 Change-Id: I3cf29ba6d7cc852de127f715b7ed27576350ae63 Signed-off-by: thuva4 --- .../ui/components/results/result/resultController.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'testapi/opnfv_testapi/ui/components/results/result/resultController.js') diff --git a/testapi/opnfv_testapi/ui/components/results/result/resultController.js b/testapi/opnfv_testapi/ui/components/results/result/resultController.js index cb5dd28..d297b43 100644 --- a/testapi/opnfv_testapi/ui/components/results/result/resultController.js +++ b/testapi/opnfv_testapi/ui/components/results/result/resultController.js @@ -35,8 +35,10 @@ ctrl.url = testapiApiUrl + '/results'; ctrl._id = $state.params['_id']; ctrl.loadDetails = loadDetails - ctrl.showTrustIndicator = showTrustIndicator - ctrl.showDetails = showDetails + + ctrl.json = {}; + ctrl.json.string = '{"id": ""}'; + ctrl.json.object = JSON.parse(ctrl.json.string); /** *Contact the testapi and retrevie the result details @@ -47,6 +49,8 @@ ctrl.podsRequest = $http.get(resultUrl).success(function (data) { ctrl.data = data; + ctrl.object=JSON.stringify(ctrl.data.details) + ctrl.json.object = JSON.parse(ctrl.object) }).catch(function (error) { ctrl.data = null; ctrl.showError = true; @@ -54,13 +58,6 @@ }); } - function showDetails(){ - if(ctrl.details){ - ctrl.details = false - }else{ - ctrl.details = true - } - } ctrl.loadDetails(); } })(); \ No newline at end of file -- cgit 1.2.3-korg