diff options
author | 2017-11-15 16:38:31 +0800 | |
---|---|---|
committer | 2017-11-15 16:38:39 +0800 | |
commit | 6aba266b3cf20c8caa41fd246772ebc344051df8 (patch) | |
tree | a9d1326f6c79baa617c51b5fd7a04091ac272b0c /usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-chartController.js | |
parent | 2e29c8babdb01a46604f8fd356dc1aad563942e9 (diff) |
Fix monitor display bugs
Change-Id: I14e0e35331049d480beed1fdf721df1bf81dd4ba
Issue-Id: USECASEUI-54
Signed-off-by: shentao <shentao@chinamobile.com>
Diffstat (limited to 'usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-chartController.js')
-rw-r--r-- | usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-chartController.js | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-chartController.js b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-chartController.js index b96abb95..39845e87 100644 --- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-chartController.js +++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-chartController.js @@ -16,8 +16,7 @@ app.controller('pertabCtrl', ['$scope', '$http', '$routeParams', '$window' , function ($scope, $http, $routeParams, $window) { - $scope.sourceIds = ["112","119","101"]; - $scope.namePs = []; + $scope.chartShow = false; $scope.valuess = []; $scope.namesPIsShow = false; $scope.namesCIsShow = false; @@ -30,8 +29,7 @@ app.controller('pertabCtrl', ['$scope', '$http', '$routeParams', '$window' , url : global_url+"/performance/resourceIds", headers: { 'Access-Control-Allow-Origin': "*", - "Content-Type": "application/json", - "Authorization": "Basic " + btoa("usecase" + ':' + "usecase") + "Content-Type": "application/json" } }).then(function successCallback(resp) { $scope.sourceIds = resp.data; @@ -69,6 +67,7 @@ app.controller('pertabCtrl', ['$scope', '$http', '$routeParams', '$window' , }).then(function successCallback(resp) { $scope.namePs = resp.data; + $scope.nameP = null; },function errorCallback(resq) { }); @@ -96,14 +95,8 @@ app.controller('pertabCtrl', ['$scope', '$http', '$routeParams', '$window' , return str.join("&"); } }).then(function successCallback(resp) { - if (resp.data.length <= 0){ - $scope.namesCIsShow = false; - $scope.goIsShow = true; - }else{ - $scope.namesCIsShow = true; - $scope.goIsShow = false; - $scope.nameCs = resp.data; - } + $scope.goIsShow = true; + $scope.chartShow = true; },function errorCallback(resq) { }); @@ -135,6 +128,7 @@ app.controller('pertabCtrl', ['$scope', '$http', '$routeParams', '$window' , } }).then(function successCallback(resp) { console.info(resp.data); + chartShow = true; if (resp.data.length > 0) for (var i = 0 ; i<resp.data.length ; i++){ $scope.valuess[i] = {}; @@ -142,6 +136,8 @@ app.controller('pertabCtrl', ['$scope', '$http', '$routeParams', '$window' , $scope.valuess[i].y = resp.data[i]; $scope.valuess[i].x.length = i; } + else + $scope.valuess = []; for (var d = 0; d < 5; d++) { window.setTimeout(function () { redraw("_performance", $scope.valuess); |