diff options
author | 2018-05-23 03:30:05 +0800 | |
---|---|---|
committer | 2018-05-23 03:30:11 +0800 | |
commit | c1860a6f7cd410f25dfc596720eb70a109090b5f (patch) | |
tree | e0ce3ff967fb9b1cfa03767d0a8c0d9435419cd4 /usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarm-detailsController.js | |
parent | 36a2001748e05b40145d7ea07efcc706b8991119 (diff) |
fix alarm and performance chart bug
Change-Id: I77f1f545fe4517bc18ef16cdc62af2f38d06eebe
Issue-ID: USECASEUI-119
Signed-off-by: zhangab <zhanganbing@chinamobile.com>
Diffstat (limited to 'usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarm-detailsController.js')
-rw-r--r-- | usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarm-detailsController.js | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarm-detailsController.js b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarm-detailsController.js index f0e0605c..8a4c1edc 100644 --- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarm-detailsController.js +++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarm-detailsController.js @@ -20,31 +20,32 @@ app.controller("alarmDetailsController",function ($scope,$http,$window) { }; $http({ method : "GET", - url : global_url + "/alarm/1/1/"+alarmDetailId+"/null/null/null/null/null" + // url : global_url + "/alarm/1/1/"+alarmDetailId+"/null/null/null/null/null" + url : global_url + "/alarm/getAlarmsHeaderDetail/"+alarmDetailId }).then(function successCallback(resp) { - if (resp.data.alarms.length > 0){ - $scope.alarmCondition = resp.data.alarms[0].alarmsHeader.alarmCondition; - $scope.alarmInterfaceA = resp.data.alarms[0].alarmsHeader.alarmInterfaceA; - $scope.eventCategory = resp.data.alarms[0].alarmsHeader.eventCategory; - $scope.eventId = resp.data.alarms[0].alarmsHeader.eventId; - $scope.eventName = resp.data.alarms[0].alarmsHeader.eventName; - $scope.eventServrity = resp.data.alarms[0].alarmsHeader.eventServrity; - $scope.eventSourceType = resp.data.alarms[0].alarmsHeader.eventSourceType; - $scope.eventType = resp.data.alarms[0].alarmsHeader.eventType; - $scope.faultFieldsVersion = resp.data.alarms[0].alarmsHeader.faultFieldsVersion; - $scope.lastEpochMicroSec = resp.data.alarms[0].alarmsHeader.lastEpochMicroSec; - $scope.nfNamingCode = resp.data.alarms[0].alarmsHeader.nfNamingCode; - $scope.nfcNamingCode = resp.data.alarms[0].alarmsHeader.nfcNamingCode; - $scope.priority = resp.data.alarms[0].alarmsHeader.priority; - $scope.reportingEntityId = resp.data.alarms[0].alarmsHeader.reportingEntityId; - $scope.reportingEntityName = resp.data.alarms[0].alarmsHeader.reportingEntityName; - $scope.sequence = resp.data.alarms[0].alarmsHeader.sequence; - $scope.sourceId = resp.data.alarms[0].alarmsHeader.sourceId; - $scope.sourceName = resp.data.alarms[0].alarmsHeader.sourceName; - $scope.specificProblem = resp.data.alarms[0].alarmsHeader.specificProblem; - $scope.startEpochMicrosec = resp.data.alarms[0].alarmsHeader.startEpochMicrosec; - $scope.startTIme = resp.data.alarms[0].alarmsHeader.createTime; - $scope.alarmInformation = resp.data.alarms[0].alarmsInformation; + if (resp.data){ + $scope.alarmCondition = resp.data.alarmsHeader.alarmCondition; + $scope.alarmInterfaceA = resp.data.alarmsHeader.alarmInterfaceA; + $scope.eventCategory = resp.data.alarmsHeader.eventCategory; + $scope.eventId = resp.data.alarmsHeader.eventId; + $scope.eventName = resp.data.alarmsHeader.eventName; + $scope.eventServrity = resp.data.alarmsHeader.eventServrity; + $scope.eventSourceType = resp.data.alarmsHeader.eventSourceType; + $scope.eventType = resp.data.alarmsHeader.eventType; + $scope.faultFieldsVersion = resp.data.alarmsHeader.faultFieldsVersion; + $scope.lastEpochMicroSec = resp.data.alarmsHeader.lastEpochMicroSec; + $scope.nfNamingCode = resp.data.alarmsHeader.nfNamingCode; + $scope.nfcNamingCode = resp.data.alarmsHeader.nfcNamingCode; + $scope.priority = resp.data.alarmsHeader.priority; + $scope.reportingEntityId = resp.data.alarmsHeader.reportingEntityId; + $scope.reportingEntityName = resp.data.alarmsHeader.reportingEntityName; + $scope.sequence = resp.data.alarmsHeader.sequence; + $scope.sourceId = resp.data.alarmsHeader.sourceId; + $scope.sourceName = resp.data.alarmsHeader.sourceName; + $scope.specificProblem = resp.data.alarmsHeader.specificProblem; + $scope.startEpochMicrosec = resp.data.alarmsHeader.startEpochMicrosec; + $scope.startTIme = resp.data.alarmsHeader.createTime; + $scope.alarmInformation = resp.data.list; }else { alert("No Data!"); } |