From c1860a6f7cd410f25dfc596720eb70a109090b5f Mon Sep 17 00:00:00 2001 From: zhangab Date: Wed, 23 May 2018 03:30:05 +0800 Subject: fix alarm and performance chart bug Change-Id: I77f1f545fe4517bc18ef16cdc62af2f38d06eebe Issue-ID: USECASEUI-119 Signed-off-by: zhangab --- .../uui/fusion/scripts/controller/lcmController.js | 4 +- .../scripts/view-models/lifecyclemanagement.html | 3 +- .../scripts/view-models/update-service-dialog.html | 132 ++++++++++++ .../scripts/controller/alarm-chartController.js | 210 ++++++++++++------- .../scripts/controller/alarm-detailsController.js | 49 ++--- .../fusion/scripts/controller/alarmController.js | 2 +- .../controller/performance-chartController.js | 231 ++++++++++++--------- .../controller/performance-detailsController.js | 29 +-- .../fusion/scripts/view-models/alarm-chart.html | 72 +++++-- .../app/uui/fusion/scripts/view-models/alarm.html | 2 +- .../scripts/view-models/performance-chart.html | 38 +++- .../fusion/scripts/view-models/performance.html | 2 +- 12 files changed, 525 insertions(+), 249 deletions(-) create mode 100644 usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/update-service-dialog.html diff --git a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js index 9d404c87..bc41ecef 100644 --- a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js +++ b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js @@ -202,8 +202,8 @@ app.controller('lcmCtrl', ['$scope', '$uibModal', '$log', '$http', '$timeout', ' var modalInstance = $uibModal.open({ ariaLabelledBy: 'modal-title', ariaDescribedBy: 'modal-body', - templateUrl: 'app/uui/fusion/scripts/view-models/scale-service-dialog.html', - controller: 'scaleServiceCtrl', + templateUrl: 'app/uui/fusion/scripts/view-models/update-service-dialog.html', + controller: 'updateServiceCtrl', controllerAs: 'ctrl', resolve: { customer: function () { diff --git a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/lifecyclemanagement.html b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/lifecyclemanagement.html index 36e299cf..b6e15066 100644 --- a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/lifecyclemanagement.html +++ b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/lifecyclemanagement.html @@ -50,13 +50,14 @@ - + {{serviceInstance.serviceInstanceId}} {{serviceInstance.serviceInstanceName}} {{serviceInstance.serviceType}} + diff --git a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/update-service-dialog.html b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/update-service-dialog.html new file mode 100644 index 00000000..810fe81f --- /dev/null +++ b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/update-service-dialog.html @@ -0,0 +1,132 @@ + + + + + + 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 ba298553..d064f311 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 @@ -21,6 +21,8 @@ app.controller('alarmchartCtrl', ['$scope', '$http', '$routeParams', '$window', $scope.ndaShow = false; $scope.hdaShow = false; $scope.sourceId = ""; + $scope.hourshow = false; + $scope.dayshow = true; $scope.today = function () { $scope.startTime = new Date(); $scope.endTime = new Date(); @@ -39,64 +41,6 @@ app.controller('alarmchartCtrl', ['$scope', '$http', '$routeParams', '$window', }; $scope.today(); - $scope.options = { - chart: { - type: 'historicalBarChart', - height: 300, - margin : { - top: 20, - right: 20, - bottom: 65, - left: 50 - }, - x: function(d){return d[0];}, - y: function(d){return d[1];}, - showValues: true, - valueFormat: function(d){ - return d3.format(',.1f')(d); - }, - duration: 100, - xAxis: { - //axisLabel: 'X Axis', - tickFormat: function(d) { - return d3.time.format('%x %H:%M')(new Date(d)) - }, - rotateLabels: 30, - showMaxMin: true - }, - yAxis: { - //axisLabel: 'Y Axis', - axisLabelDistance: -10, - tickFormat: function(d){ - return d3.format(',.1f')(d); - } - }, - tooltip: { - keyFormatter: function(d) { - return d3.time.format('%x %H:%M')(new Date(d)); - } - }, - zoom: { - enabled: false, - scaleExtent: [1, 10], - useFixedDomain: false, - useNiceScale: false, - horizontalOff: false, - verticalOff: false, - unzoomEventType: 'dblclick.zoom' - } - } - }; - - - $scope.data = [ - { - "key" : "Quantity" , - "bar": true, - "values" : [] - }]; - - $scope.genDiagram = function () { $http({ method: 'POST', @@ -105,7 +49,7 @@ app.controller('alarmchartCtrl', ['$scope', '$http', '$routeParams', '$window', "sourceId": $scope.sourceId, "startTime": FormatDate($scope.startTime), "endTime": FormatDate($scope.endTime), - "showMode" : ($scope.showModeId==undefined?"auto":$scope.showModeId) + "format" : ($scope.showModeId==undefined?"auto":$scope.showModeId) }, headers: {'Content-Type': 'application/x-www-form-urlencoded'}, transformRequest: function (obj) { @@ -116,37 +60,45 @@ app.controller('alarmchartCtrl', ['$scope', '$http', '$routeParams', '$window', return str.join("&"); } }).then(function successCallback(resp) { + console.log(resp); $scope.chartShow = true; - if (resp.data.length > 0){ + if (resp.data.allList){ $scope.ndaShow = false; $scope.hdaShow = true; - $scope.data = [ - { - "key" : "Max" , - "bar": true, - "values" : resp.data - }]; - $scope.api.refresh(); + drawAlarmLine(resp.data,alarmChart); } else{ $scope.ndaShow = true; $scope.hdaShow = false; - $scope.data = [ - { - "key" : "Max" , - "bar": true, - "values" : [] - }]; - $scope.api.refresh(); } }, function errorCallback(resp) { - + }); } - + $scope.showModeIdChanged = function(){ + + if($scope.showModeId == 'hour'){ + // console.log(typeof($scope.startTime)) + // console.log(String($scope.startTime)) + var str = String($scope.startTime); + var str2 = String($scope.endTime); + $scope.startTime = new Date(str.replace(/\:[0-9]{2}\:/,':00:')); + $scope.endTime = new Date(str2.replace(/\:[0-9]{2}\:/,':00:')); + $scope.hourshow = true; + $scope.dayshow = true; + }else if($scope.showModeId == 'day'){ + $scope.hourshow = false; + $scope.dayshow = true; + }else if($scope.showModeId == 'month'){ + $scope.hourshow = false; + $scope.dayshow = false; + } + + } $scope.startTimeChanged = function () { + if ($scope.startTime > $scope.endTime) $scope.endTime = ""; }; @@ -171,11 +123,109 @@ app.controller('alarmchartCtrl', ['$scope', '$http', '$routeParams', '$window', opened: false }; - $scope.showModeIds = ["minute","hour","day","month","year"]; - + $scope.showModeIds = ["hour","day","month"]; + $scope.showModeId = 'day'; function FormatDate(strTime) { var date = new Date(strTime); - return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes(); + if($scope.showModeId == 'hour'){ + return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + } + if($scope.showModeId == 'day'){ + return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + } + if($scope.showModeId == 'month'){ + return date.getFullYear() + "-" + (date.getMonth() + 1) + } + + // return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes(); } - + // 获取折线图盒子 + var alarmChart = echarts.init(document.getElementById("alarmChart")); + + function drawAlarmLine(data,myChart){ + var names = Object.keys(data); + var myseries = []; + names.forEach(function (item) { + if(item != 'dateList'){ + myseries.push({ + name: item, + type: 'line', + symbol: 'circle', + symbolSize: 10, + data: data[item] + }) + } + }) + var options = { + tooltip: { + trigger: 'axis', + formatter: (params) => { + var res = '

' + params[0].name + '

' + '
'; + // console.log(params); + for (var i = 0; i < params.length; i++) { + res += '' + params[i].seriesName + ' : ' + params[i].value + '
'; + } + res += '
'; + return res; + } + }, + legend: { + data: names, + top: 10, + icon: 'rect', + itemWidth: 10, + itemHeight: 10 + }, + grid: { + left: '3%', + right: '5%', + bottom: '5%', + top: '15%', + containLabel: true + }, + xAxis: { + type: 'category', + name: 'Time', + boundaryGap: false, + data: data.dateList, + axisLabel:{ + formatter:(value)=>{ + if($scope.showModeId == 'day'){ + return value.slice(5,10) + }else if($scope.showModeId == 'hour'){ + return value.slice(5,16) + }else if($scope.showModeId == 'month'){ + return value.slice(2,7) + } + } + }, + axisLine: { + symbol: ['none', 'arrow'], + symbolOffset: [0, 12] + }, + axisTick: { + show: false + }, + splitLine: { + show: true + } + }, + yAxis: { + type: 'value', + name: 'Num', + // max: 3, + axisLine: { + symbol: ['none', 'arrow'], + symbolOffset: [0, 12] + }, + axisTick: { + show: false + } + }, + color: ['blue', 'orange', 'red', 'pink','gray','purple'], + series: myseries + } + myChart.setOption(options, true); + } + // drawAlarmLine(data,alarmChart) }]); 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!"); } diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarmController.js b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarmController.js index ea70a035..38f263d6 100644 --- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarmController.js +++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarmController.js @@ -111,7 +111,7 @@ app.controller('pipeAlarmCtrl', ['$scope', 'ResourceAlarm', '$interval', functio ctrl.isLoading = true; $scope.tableState = tableState; var pagination = tableState.pagination; - console.log(pagination); + // console.log(pagination); var start = pagination.start / pagination.number + 1 || 0; var number = pagination.number || 10; 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 aa138eaa..6d9c36a7 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 @@ -17,11 +17,14 @@ app.controller('pertabCtrl', ['$scope', '$http', '$routeParams', '$window' , function ($scope, $http,$routeParams,$window) { $scope.chartShow = false; - $scope.ndaShow = false; - $scope.hdaShow = false; + $scope.ndaShow = false; + $scope.hdaShow = false; $scope.valuess = []; $scope.namesPIsShow = false; $scope.goIsShow = true; + $scope.hourshow = false; + $scope.dayshow = true; + $scope.timestep = '5'; $scope.today = function() { $scope.startTime = new Date(); $scope.endTime = new Date(); @@ -82,23 +85,24 @@ app.controller('pertabCtrl', ['$scope', '$http', '$routeParams', '$window' , $scope.namePChanged = function () { if ($scope.nameP != null){ - $http({ - method : "POST", - url : global_url + "/performance/names", - data : { "sourceId":$scope.nameP }, - headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - transformRequest: function(obj) { - var str = []; - for (var p in obj) { - str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); - } - return str.join("&"); - } - }).then(function successCallback(resp) { - $scope.goIsShow = false; - },function errorCallback(resq) { + $scope.goIsShow = false; + // $http({ + // method : "POST", + // url : global_url + "/performance/names", + // data : { "sourceId":$scope.nameP }, + // headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + // transformRequest: function(obj) { + // var str = []; + // for (var p in obj) { + // str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); + // } + // return str.join("&"); + // } + // }).then(function successCallback(resp) { + // $scope.goIsShow = false; + // },function errorCallback(resq) { - }); + // }); } else{ $scope.goIsShow = true; @@ -106,63 +110,7 @@ app.controller('pertabCtrl', ['$scope', '$http', '$routeParams', '$window' , } }; - $scope.options = { - chart: { - type: 'historicalBarChart', - height: 300, - margin : { - top: 20, - right: 20, - bottom: 65, - left: 50 - }, - x: function(d){return d[0];}, - y: function(d){return d[1];}, - showValues: true, - valueFormat: function(d){ - return d3.format(',.1f')(d); - }, - duration: 100, - xAxis: { - //axisLabel: 'X Axis', - tickFormat: function(d) { - return d3.time.format('%x %H:%M')(new Date(d)) - }, - rotateLabels: 30, - showMaxMin: true - }, - yAxis: { - //axisLabel: 'Y Axis', - axisLabelDistance: -10, - tickFormat: function(d){ - return d3.format(',.1f')(d); - } - }, - tooltip: { - keyFormatter: function(d) { - return d3.time.format('%x %H:%M')(new Date(d)); - } - }, - zoom: { - enabled: false, - scaleExtent: [1, 10], - useFixedDomain: false, - useNiceScale: false, - horizontalOff: false, - verticalOff: false, - unzoomEventType: 'dblclick.zoom' - } - } - }; - - - $scope.data = [ - { - "key" : "Quantity" , - "bar": true, - "values" : [] - }]; - + $scope.genDiagram = function () { $scope.chartShow = true; $http({ @@ -185,34 +133,39 @@ app.controller('pertabCtrl', ['$scope', '$http', '$routeParams', '$window' , } }).then(function successCallback(resp) { console.info(resp); - if (resp.data.length > 0){ + if (resp.data.dateList){ $scope.ndaShow = false; $scope.hdaShow = true; - $scope.data = [ - { - "key" : "Count" , - "bar": true, - "values" : resp.data - }]; - $scope.api.refresh(); + + drawPerformanceBar(resp.data,performanceChart); } else{ $scope.ndaShow = true; $scope.hdaShow = false; - $scope.data = [ - { - "key" : "Count" , - "bar": true, - "values" : [] - }]; - $scope.api.refresh(); + } },function errorCallback(resp) { }); }; + $scope.showModeIdChanged = function(){ + if($scope.showModeId == 'minute'){ + $scope.hourshow = true; + $scope.timestep = '5'; + }else if($scope.showModeId == 'hour'){ + var str = String($scope.startTime); + var str2 = String($scope.endTime); + $scope.startTime = new Date(str.replace(/\:[0-9]{2}\:/,':00:')); + $scope.endTime = new Date(str2.replace(/\:[0-9]{2}\:/,':00:')); + $scope.hourshow = true; + $scope.timestep = '0'; + }else if($scope.showModeId == 'day'){ + $scope.hourshow = false; + } + + } $scope.open1 = function() { $scope.popup1.opened = true; }; @@ -231,12 +184,104 @@ app.controller('pertabCtrl', ['$scope', '$http', '$routeParams', '$window' , $scope.modeShow = false; - $scope.showModeIds = ["minute","hour","day","month","year"]; - + $scope.showModeIds = ["minute","hour","day"]; + $scope.showModeId = 'day'; function FormatDate (strTime) { var date = new Date(strTime); return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes(); } - + // 获取柱状图盒子 + var performanceChart = echarts.init(document.getElementById("performanceChart")); + + function drawPerformanceBar(data,myChart){ + var names = Object.keys(data); + var myseries = []; + names.forEach(function (item) { + if(item != 'dateList'){ + myseries.push({ + name: item, + type: 'bar', + // symbol: 'circle', + // symbolSize: 10, + data: data[item] + }) + } + }) + var options = { + tooltip: { + trigger: 'axis', + formatter: (params) => { + var res = '

' + params[0].name + '

' + '
'; + // console.log(params); + for (var i = 0; i < params.length; i++) { + res += '' + params[i].seriesName + ' : ' + params[i].value + '
'; + } + res += '
'; + return res; + } + }, + legend: { + data: names, + top: 10, + icon: 'rect', + itemWidth: 10, + itemHeight: 10 + }, + grid: { + left: '3%', + right: '5%', + bottom: '5%', + top: '15%', + containLabel: true + }, + xAxis: { + type: 'category', + name: 'Time', + boundaryGap: true, + data: data.dateList, + axisLabel:{ + formatter:(value)=>{ + if($scope.showModeId == 'day'){ + return value.slice(5,10) + }else if($scope.showModeId == 'hour'){ + return value.slice(5,16) + }else if($scope.showModeId == 'minute'){ + return value.slice(5,16) + } + } + }, + axisLine: { + symbol: ['none', 'arrow'], + symbolOffset: [0, 12] + }, + axisTick: { + show: false, + }, + splitLine: { + show: true + } + }, + yAxis: { + type: 'value', + name: 'Num', + // max: 3, + axisLine: { + symbol: ['none', 'arrow'], + symbolOffset: [0, 12] + }, + axisTick: { + show: false + } + }, + color: ['green', 'orange', 'red', 'pink','gray','purple'], + series: myseries + } + myChart.setOption(options, true); + } + // var data = { + // dateList:["2018-05-23 34:35:00",2,3,4,5,6,7,8,9,10], + // valueList:[5,3,1,7,3,5,8,3,5,2] + // } + // drawPerformanceBar(data,performanceChart) }]); 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 78330285..a6003d4a 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 @@ -18,22 +18,25 @@ app.controller("performanceDetailsController",function ($scope,$http,$window) { var obj = $("#lm"); angular.element(obj).scope().currentTab = "app/uui/fusion/scripts/view-models/performance.html"; }; + console.log(permanceId); $http({ method : "GET", - url : global_url + "/performance/1/1/"+permanceId+"/null/null/null/null" + // url : global_url + "/performance/1/1/"+permanceId+"/null/null/null/null" + url : global_url + "/performance/getPerformanceHeaderDetail/"+permanceId }).then(function successCallback(resp) { - 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; + console.log(resp.data); + if (resp.data){ + $scope.eventName = resp.data.performanceHeader.eventName; + $scope.eventId = resp.data.performanceHeader.eventId; + $scope.sourceId = resp.data.performanceHeader.sourceId; + $scope.sourceName = resp.data.performanceHeader.sourceName; + $scope.reportingEntityId = resp.data.performanceHeader.reportingEntityId; + $scope.reportingEntityName = resp.data.performanceHeader.reportingEntityName; + $scope.priority = resp.data.performanceHeader.priority; + $scope.createTime = resp.data.performanceHeader.createTime; + $scope.nfcNamingCode = resp.data.performanceHeader.nfcNamingCode; + $scope.nfNamingCode = resp.data.performanceHeader.nfNamingCode; + $scope.performanceInformation = resp.data.list; }else { alert("No Data"); } diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm-chart.html b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm-chart.html index 9f06bf4e..6715a7b1 100644 --- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm-chart.html +++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm-chart.html @@ -48,6 +48,18 @@ .nodatainner { padding: 10px; } + + #alarmChart { + width: 100%; + height: 260px; + } + /* .minutes { + display: none; + } + + .uib-separator { + display: none; + } */
@@ -59,28 +71,40 @@

-

- -
-
+
+ +
+
+ +
+ +

-

- -
-
+
+ +
+
+ +
+

+

@@ -93,14 +117,14 @@
- -
- + +
+ +
-
@@ -110,14 +134,16 @@
-
+
+
Chart

No Data Available

- + +
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm.html b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm.html index b256c62d..6711749f 100644 --- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm.html +++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm.html @@ -104,7 +104,7 @@ {{row.alarmsHeader.createTime}} {{row.alarmsHeader.status}} - + diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance-chart.html b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance-chart.html index 44ad2843..711ab964 100644 --- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance-chart.html +++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance-chart.html @@ -49,6 +49,10 @@ .nodatainner { padding: 10px; } + #performanceChart { + width: 100%; + height: 300px; + }
@@ -59,24 +63,35 @@

-

+
-
+ +

-

- +
-
+ +

@@ -103,7 +118,7 @@
@@ -113,11 +128,14 @@

-
+
+

No Data Available

- + +
+
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance.html b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance.html index 94d52e56..1a7348a5 100644 --- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance.html +++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance.html @@ -92,7 +92,7 @@ {{row.performanceHeader.priority}} {{row.performanceHeader.createTime}} - + -- cgit 1.2.3-korg