Commit 5eb150bc authored by wangqinghua's avatar wangqinghua

网站监测

parent 6ecd7267
......@@ -35,7 +35,7 @@ export class AlarmListComponent implements OnInit {
pageCount = pageSize;
//条件
timeType;
timeType = '1';
obj = {
priorityName:null,
groupid:null,
......@@ -50,10 +50,10 @@ export class AlarmListComponent implements OnInit {
}
ngOnInit() {
const obj = {};
this.getType();
this.getWarnGroup();
this.warnList.getList(obj);
this.changeType();
this.searchValue();
}
//获取分组
......
......@@ -21,7 +21,10 @@
<div nz-row class="search-form">
<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 class="tag-warn tag-form">
......
......@@ -105,7 +105,8 @@ export class BasicEditComponent implements OnInit {
this.validateForm.groups = data.groups;
if(data.parentTemplates){
const tempArr = data.parentTemplates.map(res=>{
let tempArr = [];
tempArr = data.parentTemplates.map(res=>{
return res.templateid;
});
this.validateForm.templates = tempArr;
......@@ -247,7 +248,7 @@ export class BasicEditComponent implements OnInit {
getTemplate() {
this.overAllSer.templates().subscribe(
(res) => {
this.tempList = res.apiResponse.data;
this.tempList = res.apiResponse.data.result;
}
);
}
......@@ -372,7 +373,7 @@ export class BasicEditComponent implements OnInit {
name: null,
serialno_a: null
},
templates: [],
templates: null,
name: null,
host: null,
ipmi_authtype: null,
......
......@@ -30,10 +30,22 @@
</div>
<div class="releative">
<div class="checkTags tag-form">
<span> <nz-tag [nzColor]="color.green"></nz-tag>{{checkStatus.normal}}</span>
<span> <nz-tag [nzColor]="color.yellow"></nz-tag>{{checkStatus.warning}}</span>
<span> <nz-tag [nzColor]="color.red"></nz-tag>{{checkStatus.high}}</span>
<span> <nz-tag [nzColor]="color.gray"></nz-tag>{{checkStatus.disabled}}</span>
<span> <nz-tag [nzColor]="color.green"></nz-tag>
<i *ngIf="!checkStatus.normal && checkStatus.normal !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.normal}}
</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>
<nz-tabset class="tabs-smart ">
......
......@@ -66,10 +66,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
checkList: any[];
isCheck = false;
checkStatus = {
warning: '0',
normal: '0',
disabled: '0',
high: '0'
warning: null,
normal: null,
disabled: null,
high: null
};
isKey = false;
......
......@@ -26,12 +26,24 @@
<div nz-row class="search-form tag-form">
<div nz-col nzSpan="12">
<span>网站监测数:{{deviceNo}}</span>
<span>网站监测数:{{checkStatus.total}}</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.yellow"></nz-tag>{{checkStatus.yellow}} </span>
<span style="margin-right: 8px"> <nz-tag [nzColor]="color.red"></nz-tag>{{checkStatus.red}} </span>
<span> <nz-tag [nzColor]="color.gray"></nz-tag>{{checkStatus.gray}} </span>
<span style="margin-right: 8px"> <nz-tag [nzColor]="color.green"></nz-tag>
<i *ngIf="!checkStatus.type.normalNum && checkStatus.type.normalNum !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.type.normalNum}}
</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>
</div>
<div nz-col nzSpan="12" class="text-right">
......
......@@ -32,10 +32,13 @@ export class NetworkCheckComponent implements OnInit {
totalNum;
checkStatus = {
green: '',
yellow: '',
red: '',
gray: ''
type:{
seriousNum:null,
notNum:null,
warnNum:null,
normalNum:null
},
total:null
};
batchSelectList = [];
......@@ -80,7 +83,15 @@ export class NetworkCheckComponent implements OnInit {
//监测状态
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 {
findAlert(data): Observable<any>{
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