summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/ui/components/results/result/resultController.js
diff options
context:
space:
mode:
authorthuva4 <tharma.thuva@gmail.com>2018-03-16 15:29:44 +0530
committerthuva4 <tharma.thuva@gmail.com>2018-03-16 15:29:44 +0530
commit4ca8f9bc1b74ce826b36f0d44233679bfc5ce8f9 (patch)
treeae2731151c1065e9ca42e4c547fc8756fecb8147 /testapi/opnfv_testapi/ui/components/results/result/resultController.js
parentd75376d833b0d42eb6e57d4915c89c94d9379047 (diff)
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 <tharma.thuva@gmail.com>
Diffstat (limited to 'testapi/opnfv_testapi/ui/components/results/result/resultController.js')
-rw-r--r--testapi/opnfv_testapi/ui/components/results/result/resultController.js15
1 files changed, 6 insertions, 9 deletions
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