diff options
Diffstat (limited to 'testapi/opnfv_testapi/ui/components/results/result')
-rw-r--r-- | testapi/opnfv_testapi/ui/components/results/result/result.html | 46 | ||||
-rw-r--r-- | testapi/opnfv_testapi/ui/components/results/result/resultController.js | 7 |
2 files changed, 9 insertions, 44 deletions
diff --git a/testapi/opnfv_testapi/ui/components/results/result/result.html b/testapi/opnfv_testapi/ui/components/results/result/result.html index e6b30a9..041f244 100644 --- a/testapi/opnfv_testapi/ui/components/results/result/result.html +++ b/testapi/opnfv_testapi/ui/components/results/result/result.html @@ -3,49 +3,11 @@ <div class="table-responsive"> <table class="table" ng-data="ctrl.data.pods"> <tbody> - <tr style="padding:9px"> - <td class="podsTableTd">Id :</td> - <td class="podsTableLeftTd">{{ctrl.data._id}}</td> - </tr> - <tr style="padding:9px"> - <td class="podsTableTd">Pod Name:</td> - <td width="90%" class="podsTableLeftTd">{{ctrl.data.pod_name}}</td> - </tr> - <tr style="padding:9px"> - <td class="podsTableTd">Project Name:</td> - <td width="90%" class="podsTableLeftTd">{{ctrl.data.project_name}}</td> - </tr> - <tr style="padding:9px"> - <td class="podsTableTd">Case Name :</td> - <td width="90%" class="podsTableLeftTd">{{ctrl.data.case_name}}</td> - </tr> - <tr style="padding:9px"> - <td class="podsTableTd">Installer :</td> - <td width="90%" class="podsTableLeftTd">{{ctrl.data.installer}}</td> - </tr> - <tr style="padding:9px"> - <td class="podsTableTd">Version :</td> - <td width="90%" class="podsTableLeftTd">{{ctrl.data.version}}</td> - </tr> - <tr style="padding:9px"> - <td class="podsTableTd">Scenario :</td> - <td width="90%" class="podsTableLeftTd">{{ctrl.data.scenario}}</td> - </tr> - <tr style="padding:9px"> - <td class="podsTableTd">Build tag :</td> - <td width="90%" class="podsTableLeftTd">{{ctrl.data['build_tag']}}</td> + <tr ng-repeat-start="(index, detail) in ctrl.data_field" style="padding:9px"> + <td class="podsTableTd">{{detail | capitalize}} :</td> + <td width="90%" class="podsTableLeftTd">{{ctrl.data[index]}}</td> </tr> - <tr style="padding:9px"> - <td class="podsTableTd">Criteria :</td> - <td width="90%" class="podsTableLeftTd">{{ctrl.data.criteria}}</td> - </tr> - <tr style="padding:9px"> - <td class="podsTableTd">Start Date:</td> - <td width="90%" class="podsTableLeftTd">{{ctrl.data.start_date}}</td> - </tr> - <tr style="padding:9px"> - <td class="podsTableTd">Stop Date :</td> - <td width="90%" class="podsTableLeftTd">{{ctrl.data.stop_date}}</td> + <tr ng-repeat-end=> </tr> <tr style="padding:9px"> <td class="podsTableTd">Details :</td> 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; |