summaryrefslogtreecommitdiffstats
path: root/reporting
diff options
context:
space:
mode:
authorchenjiankun <chenjiankun1@huawei.com>2017-06-01 01:49:51 +0000
committerchenjiankun <chenjiankun1@huawei.com>2017-06-02 16:13:45 +0000
commita5ac84f2ff1471620da0bcd63f2ee4028c661918 (patch)
tree5fda897a6f6900e44c5d88793e4fffa2b126802b /reporting
parentff3b3116de42dbd63fe8952700de7fa2a7134502 (diff)
Change to 'catalog_description' in Catalogue page
JIRA: RELENG-231 Change-Id: Id0b770575c0d91a58b3503f8580bd658337b2cd0 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Diffstat (limited to 'reporting')
-rw-r--r--reporting/api/api/handlers/testcases.py2
-rw-r--r--reporting/pages/app/images/overview.pngbin76161 -> 113333 bytes
-rw-r--r--reporting/pages/app/scripts/controllers/testvisual.controller.js45
-rw-r--r--reporting/pages/app/styles/custome.css1
-rw-r--r--reporting/pages/app/views/commons/testCaseVisual.html7
-rw-r--r--reporting/pages/app/views/modal/testcasedetail.html4
6 files changed, 41 insertions, 18 deletions
diff --git a/reporting/api/api/handlers/testcases.py b/reporting/api/api/handlers/testcases.py
index 110ac4c..2b91186 100644
--- a/reporting/api/api/handlers/testcases.py
+++ b/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/reporting/pages/app/images/overview.png b/reporting/pages/app/images/overview.png
index 14dbbff..f1688cf 100644
--- a/reporting/pages/app/images/overview.png
+++ b/reporting/pages/app/images/overview.png
Binary files differ
diff --git a/reporting/pages/app/scripts/controllers/testvisual.controller.js b/reporting/pages/app/scripts/controllers/testvisual.controller.js
index 7082aed..def8e72 100644
--- a/reporting/pages/app/scripts/controllers/testvisual.controller.js
+++ b/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/reporting/pages/app/styles/custome.css b/reporting/pages/app/styles/custome.css
index 7ab869b..8e567ca 100644
--- a/reporting/pages/app/styles/custome.css
+++ b/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/reporting/pages/app/views/commons/testCaseVisual.html b/reporting/pages/app/views/commons/testCaseVisual.html
index 9d146ba..74eb56e 100644
--- a/reporting/pages/app/views/commons/testCaseVisual.html
+++ b/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/reporting/pages/app/views/modal/testcasedetail.html b/reporting/pages/app/views/modal/testcasedetail.html
index 8918b3f..db6f712 100644
--- a/reporting/pages/app/views/modal/testcasedetail.html
+++ b/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>