diff options
Diffstat (limited to 'testapi')
-rw-r--r-- | testapi/opnfv_testapi/ui/components/projects/project/project.html | 22 | ||||
-rw-r--r-- | testapi/opnfv_testapi/ui/components/projects/project/projectController.js | 6 |
2 files changed, 8 insertions, 20 deletions
diff --git a/testapi/opnfv_testapi/ui/components/projects/project/project.html b/testapi/opnfv_testapi/ui/components/projects/project/project.html index b6a751c..2762fff 100644 --- a/testapi/opnfv_testapi/ui/components/projects/project/project.html +++ b/testapi/opnfv_testapi/ui/components/projects/project/project.html @@ -16,25 +16,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 ng-repeat-start="(index, detail) in ctrl.data_field" style="padding:9px"> + <td class="podsTableTd">{{detail | capitalize}} :</td> + <td width="85%" class="podsTableLeftTd">{{ctrl.data[index]}}</td> </tr> - <tr style="padding:9px"> - <td class="podsTableTd">Name :</td> - <td width="90%" class="podsTableLeftTd">{{ctrl.data.name}}</td> - </tr> - <tr style="padding:9px"> - <td class="podsTableTd">Creator :</td> - <td width="90%" class="podsTableLeftTd">{{ctrl.data.creator}}</td> - </tr> - <tr style="padding:9px"> - <td class="podsTableTd">Created at :</td> - <td width="90%" class="podsTableLeftTd">{{ctrl.data['creation_date']}}</td> - </tr> - <tr style="padding:9px"> - <td class="podsTableTd">Description :</td> - <td width="90%" class="podsTableLeftTd">{{ctrl.data.description}}</td> + <tr ng-repeat-end=> </tr> </tbody> </table> diff --git a/testapi/opnfv_testapi/ui/components/projects/project/projectController.js b/testapi/opnfv_testapi/ui/components/projects/project/projectController.js index 78b805d..9dc9e27 100644 --- a/testapi/opnfv_testapi/ui/components/projects/project/projectController.js +++ b/testapi/opnfv_testapi/ui/components/projects/project/projectController.js @@ -21,7 +21,7 @@ ProjectController.$inject = [ '$scope', '$http', '$filter', '$state', '$window', '$uibModal', 'testapiApiUrl','raiseAlert', - 'confirmModal' + 'confirmModal', 'dataFieldService' ]; /** @@ -30,12 +30,13 @@ * through projects declared in TestAPI. */ function ProjectController($scope, $http, $filter, $state, $window, $uibModal, testapiApiUrl, - raiseAlert, confirmModal) { + raiseAlert, confirmModal, dataFieldService) { var ctrl = this; ctrl.name = $state.params['name']; ctrl.url = testapiApiUrl + '/projects/' + ctrl.name; ctrl.loadDetails = loadDetails; + ctrl.data_field = {} /** * This will contact the TestAPI to get a listing of declared projects. @@ -45,6 +46,7 @@ ctrl.projectsRequest = $http.get(ctrl.url).success(function (data) { ctrl.data = data; + ctrl.data_field = dataFieldService.dataFunction(ctrl.data, ctrl.data_field) }).catch(function (error) { ctrl.data = null; ctrl.showError = true; |