summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/fcaps
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-12-20 11:00:08 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-12-20 11:00:15 +0800
commit936a4e85f79980beb2307db2afde3caaa2ad5ebd (patch)
treebfb4659b2bf80a7e9cf5bfe4d03277589661aecc /usecaseui-portal/src/app/views/fcaps
parent33525aee0aaa0bdbfa2e36be6a47745150f6350d (diff)
feat:filter Echarts data of slicing monitor page
Change-Id: If3373ace368ab81f1c37768bd9b26ecf60fa9ba3 Issue-ID: USECASEUI-370 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/fcaps')
-rw-r--r--usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.ts34
1 files changed, 25 insertions, 9 deletions
diff --git a/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.ts b/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.ts
index 5ba444c8..f7771d13 100644
--- a/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.ts
+++ b/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.ts
@@ -102,11 +102,13 @@ export class Monitor5gComponent implements OnInit {
this.trafficData = [];
this.trafficLegend = [];
slicing_usage_traffic_list.forEach((item) => {
- this.trafficData.push({
- name: item.service_id,
- value: item.traffic_data
- });
- this.trafficLegend.push(item.service_id)
+ if(item.service_id !==null){
+ this.trafficData.push({
+ name: item.service_id,
+ value: item.traffic_data
+ });
+ this.trafficLegend.push(item.service_id)
+ }
});
this.trafficChartData = {
legend: {
@@ -136,11 +138,13 @@ export class Monitor5gComponent implements OnInit {
this.onlineuserXAxis = [];
this.onlineusersData = [];
this.onlineuserLegend = [];
- slicing_online_user_list[0].online_user_list.map((key) => {
+ let filterList = [];
+ filterList = this.filterData(slicing_online_user_list);
+ filterList[0].online_user_list.map((key) => {
let date = moment(Number(key.timestamp)).format('YYYY-MM-DD/HH:mm').split("/")[1];
this.onlineuserXAxis.push(date)
});
- slicing_online_user_list.forEach((item) => {
+ filterList.forEach((item) => {
this.onlineuserLegend.push(item.service_id);
this.onlineusersData.push({
name: item.service_id,
@@ -170,11 +174,14 @@ export class Monitor5gComponent implements OnInit {
this.bandwidthXAxis = [];
this.bandwidthData = [];
this.bandwidthLegend = [];
- slicing_total_bandwidth_list[0].total_bandwidth_list.map((key) => {
+ let filterList = [];
+ filterList = this.filterData(slicing_total_bandwidth_list);
+ console.log(filterList,"filterList----slicing_total_bandwidth");
+ filterList[0].total_bandwidth_list.map((key) => {
let date = moment(Number(key.timestamp)).format('YYYY-MM-DD/HH:mm').split("/")[1];
this.bandwidthXAxis.push(date)
});
- slicing_total_bandwidth_list.forEach((item) => {
+ filterList.forEach((item) => {
this.bandwidthLegend.push(item.service_id);
this.bandwidthData.push({
name: item.service_id,
@@ -210,4 +217,13 @@ export class Monitor5gComponent implements OnInit {
})
return datas
}
+ filterData(data){
+ let filter = [];
+ data.map((item,index) => {
+ if(item.service_id !== null){
+ filter.push(item)
+ }
+ });
+ return filter
+ }
}