Commit 9fc847fa authored by wangqinghua's avatar wangqinghua

update

parent 72775e8f
<nz-modal [nzWidth]="880" [(nzVisible)]="isVisible" nzTitle="{{title}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<nz-modal [nzWidth]="880" [(nzVisible)]="isVisible" [nzTitle]="title" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" [nzOkLoading]="isOkLoading">
<form nz-form [formGroup]="validateForm">
<nz-form-item>
<nz-form-label [nzSpan]="7" nzRequired nzFor="description">名称</nz-form-label>
......
......@@ -11,6 +11,7 @@ import {NzMessageService} from 'ng-zorro-antd';
export class MediaTypeComponent implements OnInit {
@Output() done = new EventEmitter<any>();
isVisible = false;
isOkLoading = false;
title;
validateForm: FormGroup;
......@@ -128,6 +129,7 @@ export class MediaTypeComponent implements OnInit {
return false;
}
this.isOkLoading = true;
if (this.title == '新增发送方式') {
this.create();
}
......@@ -148,6 +150,7 @@ export class MediaTypeComponent implements OnInit {
}else{
this.message.error(res.errMsg);
}
this.isOkLoading = false;
}
);
}
......@@ -161,7 +164,10 @@ export class MediaTypeComponent implements OnInit {
this.initForm();
this.message.info('修改成功');
this.done.emit();
}else{
this.message.error(res.errMsg);
}
this.isOkLoading = false;
}
);
}
......
<nz-modal [(nzVisible)]="isCreate" nzTitle="{{title}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<nz-modal [(nzVisible)]="isCreate" nzTitle="{{title}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" [nzOkLoading]="isOkLoading">
<form nz-form [formGroup]="validateForm">
<nz-form-item>
<nz-form-label [nzSpan]="7" nzRequired nzFor="name">组名称</nz-form-label>
......
......@@ -22,6 +22,7 @@ export class CreateGroupComponent implements OnInit {
title;
isCreate = false;
isOkLoading = false;
validateForm: FormGroup;
groupid;
......@@ -54,6 +55,7 @@ export class CreateGroupComponent implements OnInit {
if(this.validateForm.invalid){
return false;
}
this.isOkLoading = true;
if(this.title == '添加分组' || this.title == '添加模版组'){
this.create();
......@@ -73,6 +75,7 @@ export class CreateGroupComponent implements OnInit {
} else {
this.message.info(res.errMsg);
}
this.isOkLoading = false;
}
);
}
......@@ -93,6 +96,7 @@ export class CreateGroupComponent implements OnInit {
} else {
this.message.info(res.errMsg);
}
this.isOkLoading = false;
}
);
}
......
<nz-modal [nzWidth]="880" [(nzVisible)]="isVisiable" [nzTitle]="title" (nzOnCancel)="handleCheckCancel()"
(nzOnOk)="handleCheckOk()">
(nzOnOk)="handleCheckOk()" [nzOkLoading]="isOkLoading">
<form [formGroup]="validateForm" nz-form>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired nzFor="checkName">名称</nz-form-label>
......
......@@ -17,6 +17,7 @@ export class DiscoveryComponent implements OnInit {
title;
isVisiable = false;
isOkLoading = false;
nzSize = 'large';
hostId; //主机ID
itemId; //监控项id
......@@ -87,7 +88,8 @@ export class DiscoveryComponent implements OnInit {
this.validateForm.patchValue({
status:d,
hostid:this.hostId
})
});
this.isOkLoading = true;
if (this.title == '添加自动发现') {
this.create();
}
......@@ -106,6 +108,7 @@ export class DiscoveryComponent implements OnInit {
} else {
this.message.error(res.errMsg);
}
this.isOkLoading = false;
},
(err) => {
this.message.error('系统错误');
......@@ -125,6 +128,7 @@ export class DiscoveryComponent implements OnInit {
} else {
this.message.error(res.errMsg);
}
this.isOkLoading = false;
},
(err) => {
this.message.error('系统错误');
......
<nz-modal [(nzVisible)]="isVisible" [nzTitle]="title" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<nz-modal [(nzVisible)]="isVisible" [nzTitle]="title" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" [nzOkLoading]="isOkLoading">
<form nz-form [formGroup]="validateForm">
<nz-form-item>
<nz-form-label [nzSpan]="7" nzRequired nzFor="oldPassword">旧密码</nz-form-label>
......
......@@ -13,6 +13,7 @@ import {LoginService} from '../../shared';
export class ModifyPasswordComponent implements OnInit {
isVisible = false;
isOkLoading = false;
title = '修改密码';
validateForm: FormGroup;
......@@ -41,6 +42,7 @@ export class ModifyPasswordComponent implements OnInit {
this.message.error("两次输入密码不一致");
return false;
}
this.isOkLoading = true;
this.update();
}
......@@ -58,6 +60,7 @@ export class ModifyPasswordComponent implements OnInit {
} else {
this.message.error(res.errMsg);
}
this.isOkLoading = false;
}
);
}
......
<nz-modal [(nzVisible)]="isNew" nzTitle="{{modalTitle}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<nz-modal [(nzVisible)]="isNew" nzTitle="{{modalTitle}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" [nzOkLoading]="isOkLoading">
<form nz-form>
<nz-form-item>
<nz-form-label [nzSpan]="7" nzRequired nzFor="name">名称</nz-form-label>
......
......@@ -12,6 +12,7 @@ import { Component, OnInit, EventEmitter, Output } from '@angular/core';
export class NewTypeComponent implements OnInit {
@Output() data = new EventEmitter<any>();
isNew = false;
isOkLoading = false;
modalTitle;
name; //名称
modalMsg = false; //message
......
<nz-modal [(nzVisible)]="isShow" nzTitle="{{modalTitle}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<nz-modal [(nzVisible)]="isShow" nzTitle="{{modalTitle}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" [nzOkLoading]="isOkLoading">
<form nz-form>
<nz-form-item>
<nz-form-label [nzSpan]="7" nzRequired nzFor="startTime">开始时间</nz-form-label>
......
......@@ -14,6 +14,7 @@ export class PauseComponent implements OnInit {
modalTitle = '临时暂停(服务器时间)';
typeTitle;
isShow = false;
isOkLoading = false;
data = {
startTime: null,
time: ''
......@@ -44,6 +45,7 @@ export class PauseComponent implements OnInit {
}
handleOk() {
this.isOkLoading = true;
if(this.typeTitle == '基础资源'){
this.basic();
}
......@@ -68,6 +70,7 @@ export class PauseComponent implements OnInit {
}else{
this.message.error(res.errMsg);
}
this.isOkLoading = false;
}
);
}
......@@ -83,8 +86,11 @@ export class PauseComponent implements OnInit {
if(res.errCode == 10000){
this.isShow = false;
this.done.emit();
this.message.success("临时暂停成功");
}else{
this.message.error(res.errMsg);
}
this.message.info(res.errMsg);
this.isOkLoading = false;
}
);
}
......
......@@ -12,6 +12,7 @@ export class ThresholdComponent implements OnInit {
@Output() done = new EventEmitter<any>();
isVisiable = false;
isOkLoading = false;
title;
itemId; //监控项ID
hostName; //主机name
......@@ -179,6 +180,8 @@ export class ThresholdComponent implements OnInit {
return false;
}
this.isOkLoading = true;
if (this.title == '添加阈值') {
if (this.conditionList.length == 0 && this.faultConditionList.length == 0) {
this.isVisiable = false;
......@@ -229,6 +232,7 @@ export class ThresholdComponent implements OnInit {
} else {
this.message.error(response.errMsg);
}
this.isOkLoading = false;
}
);
}
......@@ -256,6 +260,7 @@ export class ThresholdComponent implements OnInit {
} else {
this.message.error(res.errMsg);
}
this.isOkLoading = false;
});
}
......
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