Commit 5eb150bc authored by wangqinghua's avatar wangqinghua

网站监测

parent 6ecd7267
...@@ -35,7 +35,7 @@ export class AlarmListComponent implements OnInit { ...@@ -35,7 +35,7 @@ export class AlarmListComponent implements OnInit {
pageCount = pageSize; pageCount = pageSize;
//条件 //条件
timeType; timeType = '1';
obj = { obj = {
priorityName:null, priorityName:null,
groupid:null, groupid:null,
...@@ -50,10 +50,10 @@ export class AlarmListComponent implements OnInit { ...@@ -50,10 +50,10 @@ export class AlarmListComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
const obj = {};
this.getType(); this.getType();
this.getWarnGroup(); this.getWarnGroup();
this.warnList.getList(obj); this.changeType();
this.searchValue();
} }
//获取分组 //获取分组
......
...@@ -21,7 +21,10 @@ ...@@ -21,7 +21,10 @@
<div nz-row class="search-form"> <div nz-row class="search-form">
<div nz-col nzSpan="16"> <div nz-col nzSpan="16">
<span>当前告警数:{{alarmTotal}}</span> <span>当前告警数:
<i *ngIf="!alarmTotal && alarmTotal !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{alarmTotal}}
</span>
</div> </div>
</div> </div>
<div class="tag-warn tag-form"> <div class="tag-warn tag-form">
......
...@@ -105,7 +105,8 @@ export class BasicEditComponent implements OnInit { ...@@ -105,7 +105,8 @@ export class BasicEditComponent implements OnInit {
this.validateForm.groups = data.groups; this.validateForm.groups = data.groups;
if(data.parentTemplates){ if(data.parentTemplates){
const tempArr = data.parentTemplates.map(res=>{ let tempArr = [];
tempArr = data.parentTemplates.map(res=>{
return res.templateid; return res.templateid;
}); });
this.validateForm.templates = tempArr; this.validateForm.templates = tempArr;
...@@ -247,7 +248,7 @@ export class BasicEditComponent implements OnInit { ...@@ -247,7 +248,7 @@ export class BasicEditComponent implements OnInit {
getTemplate() { getTemplate() {
this.overAllSer.templates().subscribe( this.overAllSer.templates().subscribe(
(res) => { (res) => {
this.tempList = res.apiResponse.data; this.tempList = res.apiResponse.data.result;
} }
); );
} }
...@@ -372,7 +373,7 @@ export class BasicEditComponent implements OnInit { ...@@ -372,7 +373,7 @@ export class BasicEditComponent implements OnInit {
name: null, name: null,
serialno_a: null serialno_a: null
}, },
templates: [], templates: null,
name: null, name: null,
host: null, host: null,
ipmi_authtype: null, ipmi_authtype: null,
......
...@@ -30,10 +30,22 @@ ...@@ -30,10 +30,22 @@
</div> </div>
<div class="releative"> <div class="releative">
<div class="checkTags tag-form"> <div class="checkTags tag-form">
<span> <nz-tag [nzColor]="color.green"></nz-tag>{{checkStatus.normal}}</span> <span> <nz-tag [nzColor]="color.green"></nz-tag>
<span> <nz-tag [nzColor]="color.yellow"></nz-tag>{{checkStatus.warning}}</span> <i *ngIf="!checkStatus.normal && checkStatus.normal !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
<span> <nz-tag [nzColor]="color.red"></nz-tag>{{checkStatus.high}}</span> {{checkStatus.normal}}
<span> <nz-tag [nzColor]="color.gray"></nz-tag>{{checkStatus.disabled}}</span> </span>
<span> <nz-tag [nzColor]="color.yellow"></nz-tag>
<i *ngIf="!checkStatus.warning && checkStatus.warning !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.warning}}
</span>
<span> <nz-tag [nzColor]="color.red"></nz-tag>
<i *ngIf="!checkStatus.high && checkStatus.high !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.high}}
</span>
<span> <nz-tag [nzColor]="color.gray"></nz-tag>
<i *ngIf="!checkStatus.disabled && checkStatus.disabled !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.disabled}}
</span>
</div> </div>
<nz-tabset class="tabs-smart "> <nz-tabset class="tabs-smart ">
......
...@@ -66,10 +66,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -66,10 +66,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
checkList: any[]; checkList: any[];
isCheck = false; isCheck = false;
checkStatus = { checkStatus = {
warning: '0', warning: null,
normal: '0', normal: null,
disabled: '0', disabled: null,
high: '0' high: null
}; };
isKey = false; isKey = false;
......
...@@ -26,12 +26,24 @@ ...@@ -26,12 +26,24 @@
<div nz-row class="search-form tag-form"> <div nz-row class="search-form tag-form">
<div nz-col nzSpan="12"> <div nz-col nzSpan="12">
<span>网站监测数:{{deviceNo}}</span> <span>网站监测数:{{checkStatus.total}}</span>
<span>监测状态: <span>监测状态:
<span style="margin-right: 8px"> <nz-tag [nzColor]="color.green"></nz-tag>{{checkStatus.green}} </span> <span style="margin-right: 8px"> <nz-tag [nzColor]="color.green"></nz-tag>
<span style="margin-right: 8px"> <nz-tag [nzColor]="color.yellow"></nz-tag>{{checkStatus.yellow}} </span> <i *ngIf="!checkStatus.type.normalNum && checkStatus.type.normalNum !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
<span style="margin-right: 8px"> <nz-tag [nzColor]="color.red"></nz-tag>{{checkStatus.red}} </span> {{checkStatus.type.normalNum}}
<span> <nz-tag [nzColor]="color.gray"></nz-tag>{{checkStatus.gray}} </span> </span>
<span style="margin-right: 8px"> <nz-tag [nzColor]="color.yellow"></nz-tag>
<i *ngIf="!checkStatus.type.warnNum && checkStatus.type.warnNum !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.type.warnNum}}
</span>
<span style="margin-right: 8px"> <nz-tag [nzColor]="color.red"></nz-tag>
<i *ngIf="!checkStatus.type.seriousNum && checkStatus.type.seriousNum !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.type.seriousNum}}
</span>
<span> <nz-tag [nzColor]="color.gray"></nz-tag>
<i *ngIf="!checkStatus.type.notNum && checkStatus.type.notNum !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.type.notNum}}
</span>
</span> </span>
</div> </div>
<div nz-col nzSpan="12" class="text-right"> <div nz-col nzSpan="12" class="text-right">
......
...@@ -32,10 +32,13 @@ export class NetworkCheckComponent implements OnInit { ...@@ -32,10 +32,13 @@ export class NetworkCheckComponent implements OnInit {
totalNum; totalNum;
checkStatus = { checkStatus = {
green: '', type:{
yellow: '', seriousNum:null,
red: '', notNum:null,
gray: '' warnNum:null,
normalNum:null
},
total:null
}; };
batchSelectList = []; batchSelectList = [];
...@@ -80,7 +83,15 @@ export class NetworkCheckComponent implements OnInit { ...@@ -80,7 +83,15 @@ export class NetworkCheckComponent implements OnInit {
//监测状态 //监测状态
getCheckStatus() { getCheckStatus() {
this.overAllSer.countStatus().subscribe(
(res)=>{
if(res.errCode == 10000){
this.checkStatus = res.data;
}else{
this.message.info(res.errMsg);
}
}
)
} }
//选中 //选中
......
...@@ -284,4 +284,9 @@ export class OverAllService { ...@@ -284,4 +284,9 @@ export class OverAllService {
findAlert(data): Observable<any>{ findAlert(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/webscenario/findAlert' ,data); return this.http.post(SERVER_API_URL + '/webscenario/findAlert' ,data);
} }
//统计网站监测告警种类
countStatus(): Observable<any>{
return this.http.get(SERVER_API_URL + '/webscenario/countStatus');
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment