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-detailsController.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-detailsController.js')
-rw-r--r-- | usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-detailsController.js | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-detailsController.js b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-detailsController.js index ca87a4af..78330285 100644 --- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-detailsController.js +++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-detailsController.js @@ -22,17 +22,21 @@ app.controller("performanceDetailsController",function ($scope,$http,$window) { method : "GET", url : global_url + "/performance/1/1/"+permanceId+"/null/null/null/null" }).then(function successCallback(resp) { - $scope.eventName = resp.data.performances[0].performanceHeader.eventName; - $scope.eventId = resp.data.performances[0].performanceHeader.eventId; - $scope.sourceId = resp.data.performances[0].performanceHeader.sourceId; - $scope.sourceName = resp.data.performances[0].performanceHeader.sourceName; - $scope.reportingEntityId = resp.data.performances[0].performanceHeader.reportingEntityId; - $scope.reportingEntityName = resp.data.performances[0].performanceHeader.reportingEntityName; - $scope.priority = resp.data.performances[0].performanceHeader.priority; - $scope.createTime = resp.data.performances[0].performanceHeader.createTime; - $scope.nfcNamingCode = resp.data.performances[0].performanceHeader.nfcNamingCode; - $scope.nfNamingCode = resp.data.performances[0].performanceHeader.nfNamingCode; - $scope.performanceInformation = resp.data.performances[0].performanceInformation; + if (resp.data.performances.length > 0){ + $scope.eventName = resp.data.performances[0].performanceHeader.eventName; + $scope.eventId = resp.data.performances[0].performanceHeader.eventId; + $scope.sourceId = resp.data.performances[0].performanceHeader.sourceId; + $scope.sourceName = resp.data.performances[0].performanceHeader.sourceName; + $scope.reportingEntityId = resp.data.performances[0].performanceHeader.reportingEntityId; + $scope.reportingEntityName = resp.data.performances[0].performanceHeader.reportingEntityName; + $scope.priority = resp.data.performances[0].performanceHeader.priority; + $scope.createTime = resp.data.performances[0].performanceHeader.createTime; + $scope.nfcNamingCode = resp.data.performances[0].performanceHeader.nfcNamingCode; + $scope.nfNamingCode = resp.data.performances[0].performanceHeader.nfNamingCode; + $scope.performanceInformation = resp.data.performances[0].performanceInformation; + }else { + alert("No Data"); + } },function errorCallback(resq) { }); |