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/alarm-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/alarm-chartController.js')
-rw-r--r-- | usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarm-chartController.js | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarm-chartController.js b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarm-chartController.js index 8096d702..5906c42c 100644 --- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarm-chartController.js +++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarm-chartController.js @@ -16,6 +16,8 @@ app.controller('alarmchartCtrl', ['$scope', '$http', '$routeParams', '$window', function ($scope, $http, $routeParams, $window) { + $scope.goIsShow = false; + $scope.chartShow = false; $scope.valuess = []; $scope.today = function () { $scope.startTime = new Date(); @@ -29,7 +31,7 @@ app.controller('alarmchartCtrl', ['$scope', '$http', '$routeParams', '$window', "Authorization": "Basic " + btoa("usecase" + ':' + "usecase") } }).then(function successCallback(resp) { - console.info(resp); + //console.info(resp); $scope.sourceIds = resp.data; }, function errorCallback(resp) { @@ -55,13 +57,16 @@ app.controller('alarmchartCtrl', ['$scope', '$http', '$routeParams', '$window', return str.join("&"); } }).then(function successCallback(resp) { - //console.info(resp); + console.info(resp); + $scope.chartShow = true; if (resp.data.length > 0) for (var i = 0; i < resp.data.length; i++) { $scope.valuess[i] = {}; $scope.valuess[i].x = resp.data[i].Time; $scope.valuess[i].y = resp.data[i].Count; } + else + $scope.valuess = []; for (var d = 0; d < 5; d++) { window.setTimeout(function () { redraw("_alarm", $scope.valuess); @@ -72,17 +77,22 @@ app.controller('alarmchartCtrl', ['$scope', '$http', '$routeParams', '$window', }); } - + $scope.sourceIdChanged = function(){ + if ($scope.sourceId != null) + $scope.goIsShow = true; + else + $scope.goIsShow = false; + }; $scope.startTimeChanged = function () { if ($scope.startTime > $scope.endTime) $scope.endTime = ""; - console.info($scope.startTime); + // console.info($scope.startTime); }; $scope.endTimeChanged = function () { if ($scope.endTime < $scope.startTime) $scope.startTime = ""; - console.info($scope.endTime); + // console.info($scope.endTime); }; $scope.open1 = function () { |