diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2017-06-06 13:16:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-06-06 13:16:02 +0000 |
commit | 5405777dc08714eadf8020c9f9b6a8dfcbf7d48c (patch) | |
tree | b1561c4e93ca6719a375443254a342bc00d892a7 /utils/test | |
parent | 9a2ffa4606cbc724ad11ffa8ac79c92c72069b2f (diff) | |
parent | 4394a65b52355677c67e6a8cac4c4c478c0f43bb (diff) |
Merge "Change to 'catalog_description' in Catalogue page"
Diffstat (limited to 'utils/test')
-rw-r--r-- | utils/test/reporting/api/api/handlers/testcases.py | 2 | ||||
-rw-r--r-- | utils/test/reporting/pages/app/images/overview.png | bin | 76161 -> 113333 bytes | |||
-rw-r--r-- | utils/test/reporting/pages/app/scripts/controllers/testvisual.controller.js | 45 | ||||
-rw-r--r-- | utils/test/reporting/pages/app/styles/custome.css | 1 | ||||
-rw-r--r-- | utils/test/reporting/pages/app/views/commons/testCaseVisual.html | 7 | ||||
-rw-r--r-- | utils/test/reporting/pages/app/views/modal/testcasedetail.html | 4 |
6 files changed, 41 insertions, 18 deletions
diff --git a/utils/test/reporting/api/api/handlers/testcases.py b/utils/test/reporting/api/api/handlers/testcases.py index 110ac4c26..2b9118623 100644 --- a/utils/test/reporting/api/api/handlers/testcases.py +++ b/utils/test/reporting/api/api/handlers/testcases.py @@ -20,7 +20,7 @@ class TestCases(BaseHandler): url = '{}/projects/{}/cases'.format(conf.base_url, project) cases = requests.get(url).json().get('testcases', []) - data = [t['name'] for t in cases] + data = [{t['name']: t['catalog_description']} for t in cases] self.write(json_encode(data)) diff --git a/utils/test/reporting/pages/app/images/overview.png b/utils/test/reporting/pages/app/images/overview.png Binary files differindex 14dbbff42..f1688cf37 100644 --- a/utils/test/reporting/pages/app/images/overview.png +++ b/utils/test/reporting/pages/app/images/overview.png diff --git a/utils/test/reporting/pages/app/scripts/controllers/testvisual.controller.js b/utils/test/reporting/pages/app/scripts/controllers/testvisual.controller.js index 7082aede0..def8e7293 100644 --- a/utils/test/reporting/pages/app/scripts/controllers/testvisual.controller.js +++ b/utils/test/reporting/pages/app/scripts/controllers/testvisual.controller.js @@ -10,16 +10,16 @@ angular.module('opnfvApp') .controller('testVisualController', ['$scope', '$state', '$stateParams', 'TableFactory', 'ngDialog', '$http', '$loading', function($scope, $state, $stateParams, TableFactory, ngDialog, $http, $loading) { - $scope.dovet = "59,222,156,317"; - $scope.functest = "203,163,334,365"; - $scope.yardstick = "398,161,513,384"; - $scope.vsperf = "567,163,673,350"; - $scope.stor = "686,165,789,341"; - $scope.qtip = "802,164,905,341"; - $scope.bootleneck = "917,161,1022,338"; - $scope.noPopArea1 = "30,11,1243,146"; - $scope.noPopArea2 = "1041,157,1250,561"; - $scope.noPopArea3 = "15,392,1027,561"; + $scope.dovet = "50,168,177,443"; + $scope.functest = "194,173,356,442"; + $scope.yardstick = "377,183,521,412"; + $scope.vsperf = "542,185,640,414"; + $scope.stor = "658,187,750,410"; + $scope.qtip = "769,190,852,416"; + $scope.bootleneck = "870,192,983,419"; + $scope.noPopArea1 = "26,8,1190,180"; + $scope.noPopArea2 = "1018,193,1190,590"; + $scope.noPopArea3 = "37,455,1003,584"; init(); $scope.showSelectValue = 0; @@ -51,20 +51,41 @@ angular.module('opnfvApp') $http.get(url, config).then(function(response) { if (response.status == 200) { $scope.tableData = response.data; + + $scope.tableData = constructObjectArray($scope.tableData); + console.log($scope.tableData); $loading.finish('Key'); + } }) } + //construct key value for tableData + function constructObjectArray(array) { + var templateArray = []; + for (var i = 0; i < array.length; i++) { + var key = Object.keys(array[i])[0]; + var value = array[i][key]; + var temp = { + 'key': key, + 'value': value + }; + templateArray.push(temp); + + } + + return templateArray; + } + function getDetail(casename) { TableFactory.getProjectTestCaseDetail().get({ 'project': $scope.modalName, 'testcase': casename }).$promise.then(function(response) { if (response != null) { - $scope.project_name_modal = response.project_name; + $scope.name_modal = response.name; $scope.description_modal = response.description; openTestDetail(); } @@ -108,4 +129,4 @@ angular.module('opnfvApp') } - ]);
\ No newline at end of file + ]); diff --git a/utils/test/reporting/pages/app/styles/custome.css b/utils/test/reporting/pages/app/styles/custome.css index 7ab869b56..8e567ca6e 100644 --- a/utils/test/reporting/pages/app/styles/custome.css +++ b/utils/test/reporting/pages/app/styles/custome.css @@ -71,6 +71,7 @@ html { border-radius: 5px 5px 5px 5px; background-color: #f3f3f4; opacity: 0.9; + width: 200px; } .ngdialog.ngdialog.ngdialog-theme-default .ngdialog-content { diff --git a/utils/test/reporting/pages/app/views/commons/testCaseVisual.html b/utils/test/reporting/pages/app/views/commons/testCaseVisual.html index 9d146ba93..74eb56eba 100644 --- a/utils/test/reporting/pages/app/views/commons/testCaseVisual.html +++ b/utils/test/reporting/pages/app/views/commons/testCaseVisual.html @@ -4,7 +4,7 @@ <div class="row"> - <div class="row border-bottom white-bg dashboard-header" style="border-radius: 5px 5px 5px 5px "> + <div class="row border-bottom white-bg dashboard-header" style="border-radius: 5px 5px 5px 5px;width:90%;margin-left:30px; "> <h3>OPNFV Test ecosystem <small> *mouse over display test case list</small> @@ -70,7 +70,7 @@ </div> - <div id="popup" class="popup" style="width: 20%;height: 35%" dw-loading="Key"> + <div id="popup" class="popup" style="width: 40%;height: 35%" dw-loading="Key"> <div ng-show="tableData.length==0"> <center> @@ -90,7 +90,8 @@ <tbody> <tr dir-paginate="data in tableData | itemsPerPage: 8 track by $index "> - <td><a ng-click="getDetail(data)"> {{data}}</a></td> + <td ng-if="data.value!=null"><a ng-click="getDetail(data.key)"> {{data.value}}</a></td> + <td ng-if="data.value==null"><a ng-click="getDetail(data.key)"> null</a></td> <tr> </tbody> diff --git a/utils/test/reporting/pages/app/views/modal/testcasedetail.html b/utils/test/reporting/pages/app/views/modal/testcasedetail.html index 8918b3f74..db6f71295 100644 --- a/utils/test/reporting/pages/app/views/modal/testcasedetail.html +++ b/utils/test/reporting/pages/app/views/modal/testcasedetail.html @@ -2,6 +2,6 @@ <div class="hr-line-dashed"></div> -<strong> name</strong>: {{project_name_modal}}<br> +<strong> name</strong>: {{name_modal}}<br> -<strong>description</strong>: {{description_modal}}<br>
\ No newline at end of file +<strong>description</strong>: {{description_modal}}<br> |