summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/ui/components/results/result/resultController.js
diff options
context:
space:
mode:
Diffstat (limited to 'testapi/opnfv_testapi/ui/components/results/result/resultController.js')
-rw-r--r--testapi/opnfv_testapi/ui/components/results/result/resultController.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/testapi/opnfv_testapi/ui/components/results/result/resultController.js b/testapi/opnfv_testapi/ui/components/results/result/resultController.js
index d297b43..2726704 100644
--- a/testapi/opnfv_testapi/ui/components/results/result/resultController.js
+++ b/testapi/opnfv_testapi/ui/components/results/result/resultController.js
@@ -21,7 +21,7 @@
ResultController.$inject = [
'$scope', '$http', '$filter', '$state', '$window', '$uibModal', 'testapiApiUrl','raiseAlert',
- 'confirmModal'
+ 'confirmModal', 'dataFieldService'
];
/**
@@ -30,11 +30,12 @@
* through result declared in TestAPI.
*/
function ResultController($scope, $http, $filter, $state, $window, $uibModal, testapiApiUrl,
- raiseAlert, confirmModal) {
+ raiseAlert, confirmModal, dataFieldService) {
var ctrl = this;
ctrl.url = testapiApiUrl + '/results';
ctrl._id = $state.params['_id'];
ctrl.loadDetails = loadDetails
+ ctrl.data_field = {}
ctrl.json = {};
ctrl.json.string = '{"id": ""}';
@@ -51,6 +52,8 @@
ctrl.data = data;
ctrl.object=JSON.stringify(ctrl.data.details)
ctrl.json.object = JSON.parse(ctrl.object)
+ delete ctrl.data.details;
+ ctrl.data_field = dataFieldService.dataFunction(ctrl.data, ctrl.data_field)
}).catch(function (error) {
ctrl.data = null;
ctrl.showError = true;