summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/alarm
diff options
context:
space:
mode:
authorzhangab <zhanganbing@chinamobile.com>2018-11-07 12:32:58 +0800
committerzhangab <zhanganbing@chinamobile.com>2018-11-07 12:33:19 +0800
commit95125af4d61d498f008f19616d5afaa07e52759e (patch)
treebc142f541461034c289e5569d189bf1a802f5218 /usecaseui-portal/src/app/alarm
parent70606dfe5caf3b460a10cbc1bde400e1e75e6535 (diff)
Fix VNF Alarm Query Bugs
Change-Id: I52b95605d164d7d72ebfb60732c177bfb40eb200 Issue-ID: USECASEUI-165 Signed-off-by: zhangab <zhanganbing@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/alarm')
-rw-r--r--usecaseui-portal/src/app/alarm/alarm.component.html6
-rw-r--r--usecaseui-portal/src/app/alarm/alarm.component.ts74
2 files changed, 42 insertions, 38 deletions
diff --git a/usecaseui-portal/src/app/alarm/alarm.component.html b/usecaseui-portal/src/app/alarm/alarm.component.html
index 7fbbc039..b1f49949 100644
--- a/usecaseui-portal/src/app/alarm/alarm.component.html
+++ b/usecaseui-portal/src/app/alarm/alarm.component.html
@@ -83,7 +83,7 @@
<button class="open-close" [ngClass]="{'open-close-active':alarmShow}" (click)="alarmShow=!alarmShow"></button>
</div>
<div class="tablelist">
- <nz-table #nzTable [nzData]="list" [nzPageSize]="10" nzShowSizeChanger nzShowQuickJumper [nzPageSizeOptions]="[5,10,15,20]"
+ <nz-table #nzTable [nzData]="list" [(nzPageSize)]="pageSize" nzShowSizeChanger nzShowQuickJumper [nzPageSizeOptions]="[5,10,15,20]"
nzSize="middle">
<thead (nzSortChange)="sort($event)" nzSingleSort>
<tr>
@@ -92,6 +92,7 @@
<th nzWidth="10%">Priority</th>
<th nzWidth="20%">SpecificProblem</th>
<th nzWidth="20%">Report Time</th>
+ <th nzWidth="20%">Report Time</th>
<th nzWidth="15%">Status</th>
<th nzWidth="10%">Action</th>
</tr>
@@ -102,7 +103,8 @@
<td>{{item.sourceName}}</td>
<td>{{item.priority}}</td>
<td>{{item.specificProblem}}</td>
- <td>{{item.sequence}}</td>
+ <td>{{item.startEpochMicrosec}}</td>
+ <td>{{item.startEpochMicrosecCleared}}</td>
<td>{{item.status}}</td>
<td class="action"><a (click)="detailShow(item)"><i class="details"></i></a></td>
</tr>
diff --git a/usecaseui-portal/src/app/alarm/alarm.component.ts b/usecaseui-portal/src/app/alarm/alarm.component.ts
index 58c75e7b..e9f7cbdd 100644
--- a/usecaseui-portal/src/app/alarm/alarm.component.ts
+++ b/usecaseui-portal/src/app/alarm/alarm.component.ts
@@ -30,17 +30,15 @@ export class AlarmComponent implements OnInit {
size = 'day';
@HostBinding('@routerAnimate') routerAnimateState; //Routing animation
public currentPage: number = 1;
- public pageSize: number = 5;
+ public pageSize: number = 10;
public sourceName: string = '';
public priority: string = '';
public startTime: string = '';
public endTime: string = '';
public vfStatus: string = '';
- public sourceNameList:Array<any> =['---auto---'];
+ public sourceNameList: Array<any> = ['---auto---'];
list: any;
sourcenames: any;
-
-
constructor(
private datePipe: DatePipe,
private myhttp: MyhttpService) { }
@@ -61,33 +59,33 @@ export class AlarmComponent implements OnInit {
statusSelected = this.statusList[0];
choseSourceName(item) {
- if(item == "---auto---"){
+ if (item == "---auto---") {
this.sourceName = '';
- }else{
+ } else {
this.sourceName = item;
}
this.sourceNameSelected = item;
-
+
}
chosePriority(item) {
this.prioritySelected = item;
- if(item == "---auto---"){
+ if (item == "---auto---") {
this.priority = '';
- }else{
+ } else {
this.priority = item;
}
}
choseStatus(item) {
this.statusSelected = item;
- if(item == "---auto---"){
+ if (item == "---auto---") {
this.vfStatus = '';
- }else{
+ } else {
this.vfStatus = item;
}
}
getSourceNames() {
this.myhttp.getSourceNames().subscribe((data) => {
- for(let i=0;i<data.length;i++){
+ for (let i = 0; i < data.length; i++) {
this.sourceNameList.push(data[i]);
}
this.sourceNameSelected = this.sourceNameList[0];
@@ -112,15 +110,15 @@ export class AlarmComponent implements OnInit {
activeNum: 0
}
// total data
- getstatuscount(){
- this.myhttp.getstatuscount().subscribe((data)=>{
- this.alarmList.activeNum = data[0];
- this.alarmList.closed = data[1];
+ // getstatuscount(){
+ // this.myhttp.getstatuscount().subscribe((data)=>{
+ // this.alarmList.activeNum = data[0];
+ // this.alarmList.closed = data[1];
+
+ // })
+ // }
+ getAlarmFormData() {
- })
- }
- getAlarmFormData() {
-
this.myhttp.getAlarmFormData(this.currentPage, this.pageSize, this.sourceName, this.priority, this.startTime, this.endTime, this.vfStatus).subscribe((data) => {
this.list = data.alarms;
})
@@ -138,10 +136,10 @@ export class AlarmComponent implements OnInit {
xAxis:{
data:data.dataList
},
- series:[
- {data:data.allList},
- {data:data.ActiveList},
- {data:data.closedList}
+ series: [
+ { data: data.allList },
+ { data: data.ActiveList },
+ { data: data.closedList }
]
}
}, (err) => {
@@ -152,7 +150,7 @@ export class AlarmComponent implements OnInit {
day() {
let paramsObj = {
alarmSourceName: this.sourceName,
- day:"day"
+ day: "day"
}
this.myhttp.getHomeAlarmChartData(paramsObj)
.subscribe((data) => {
@@ -160,10 +158,10 @@ export class AlarmComponent implements OnInit {
xAxis:{
data:data.dataList
},
- series:[
- {data:data.allList},
- {data:data.ActiveList},
- {data:data.closedList}
+ series: [
+ { data: data.allList },
+ { data: data.ActiveList },
+ { data: data.closedList }
]
}
}, (err) => {
@@ -173,7 +171,7 @@ export class AlarmComponent implements OnInit {
month() {
let paramsObj = {
alarmSourceName: this.sourceName,
- day:"month"
+ day: "month"
}
this.myhttp.getHomeAlarmChartData(paramsObj)
.subscribe((data) => {
@@ -181,10 +179,10 @@ export class AlarmComponent implements OnInit {
xAxis:{
data:data.dataList
},
- series:[
- {data:data.allList},
- {data:data.ActiveList},
- {data:data.closedList}
+ series: [
+ { data: data.allList },
+ { data: data.ActiveList },
+ { data: data.closedList }
]
}
}, (err) => {
@@ -208,12 +206,16 @@ export class AlarmComponent implements OnInit {
{
type: 'slider',
show: true,
- // xAxisIndex: [0],
start: 1,
height: 10,
end: 40
}
],
+ xAxis:{
+ data:["2018-09-10 ","2018-09-11","2018-09-12","2018-09-13","2018-09-14",
+ "2018-09-15","2018-09-16","2018-09-17","2018-09-18","2018-09-19",
+ "2018-09-20","2018-09-21","2018-09-22","2018-09-10 ","2018-09-11","2018-09-12","2018-09-13"]
+ },
series: [
{
name: 'All',
@@ -236,7 +238,7 @@ export class AlarmComponent implements OnInit {
{
name: 'Active',
type: 'line',
- smooth: true,//将图变得平缓
+ smooth: true,//
showSymbol: false,
areaStyle: {
opacity: 0.8