Commit 1d4935ed authored by wangqinghua's avatar wangqinghua

data.interfaceid += '';

parent 0aa7d94f
...@@ -204,6 +204,7 @@ export class BasiCheckComponent implements OnInit { ...@@ -204,6 +204,7 @@ export class BasiCheckComponent implements OnInit {
this.message.success('创建监测点成功'); this.message.success('创建监测点成功');
this.done.emit(); this.done.emit();
this.tabNum = 1; this.tabNum = 1;
this.initForm();
this.isCheck = false; this.isCheck = false;
} else { } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
...@@ -227,6 +228,7 @@ export class BasiCheckComponent implements OnInit { ...@@ -227,6 +228,7 @@ export class BasiCheckComponent implements OnInit {
this.message.success('修改监测点成功'); this.message.success('修改监测点成功');
this.done.emit(); this.done.emit();
this.tabNum = 1; this.tabNum = 1;
this.initForm();
this.isCheck = false; this.isCheck = false;
} else { } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
......
...@@ -35,25 +35,6 @@ ...@@ -35,25 +35,6 @@
</nz-form-explain> </nz-form-explain>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<ng-container *ngIf="isInterface">
<ng-container *ngIf=" validateForm.value.type == '0' || validateForm.value.type == '1' || validateForm.value.type == '3' ||
validateForm.value.type == '4' || validateForm.value.type == '6' || validateForm.value.type == '10' || validateForm.value.type == '12' ||
validateForm.value.type == '13' || validateForm.value.type == '14' || validateForm.value.type == '16' || validateForm.value.type == '17'">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="interfaceid">主机接口</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select name="interfaceid" formControlName="interfaceid" nzPlaceHolder="选择主机接口">
<nz-option *ngFor="let item of interfaceList" nzValue="{{item.interfaceid}}"
nzLabel="{{item.ip}}:{{item.port}}"></nz-option>
</nz-select>
<nz-form-explain
*ngIf="validateForm.get('interfaceid').dirty && validateForm.get('interfaceid').errors">
请选择主机接口!
</nz-form-explain>
</nz-form-control>
</nz-form-item>
</ng-container>
</ng-container>
<!--<ng-container *ngIf="validateForm.value.type == 1 || validateForm.value.type == 4 || validateForm.value.type == 6">--> <!--<ng-container *ngIf="validateForm.value.type == 1 || validateForm.value.type == 4 || validateForm.value.type == 6">-->
<!--<nz-form-item>--> <!--<nz-form-item>-->
<!--<nz-form-label [nzSpan]="6" nzFor="snmp_oid">SNMP OID</nz-form-label>--> <!--<nz-form-label [nzSpan]="6" nzFor="snmp_oid">SNMP OID</nz-form-label>-->
......
...@@ -23,7 +23,6 @@ export class CheckPrototypeComponent implements OnInit { ...@@ -23,7 +23,6 @@ export class CheckPrototypeComponent implements OnInit {
hostId; //主机ID hostId; //主机ID
discoveryid; //自动发现id discoveryid; //自动发现id
itemId; //监控项id itemId; //监控项id
interfaceList: any[];
valueMapList = []; valueMapList = [];
validateForm: FormGroup; validateForm: FormGroup;
checkList; //监测点分类 checkList; //监测点分类
...@@ -48,7 +47,6 @@ export class CheckPrototypeComponent implements OnInit { ...@@ -48,7 +47,6 @@ export class CheckPrototypeComponent implements OnInit {
ruleid: [null], ruleid: [null],
type: [null, [Validators.required]], type: [null, [Validators.required]],
value_type: [null, [Validators.required]], value_type: [null, [Validators.required]],
interfaceid: [null],
delay: [null, [Validators.required]], delay: [null, [Validators.required]],
units: [null], units: [null],
history: ['3600'], history: ['3600'],
...@@ -72,11 +70,6 @@ export class CheckPrototypeComponent implements OnInit { ...@@ -72,11 +70,6 @@ export class CheckPrototypeComponent implements OnInit {
this.isCheck = true; this.isCheck = true;
this.discoveryid = discoveryid; this.discoveryid = discoveryid;
this.hostId = hostId; this.hostId = hostId;
this.overAllSer.findInterface(this.hostId).subscribe(
(res) => {
this.interfaceList = res.data;
}
);
this.isInterface = true; this.isInterface = true;
this.getItemType(); this.getItemType();
...@@ -100,7 +93,6 @@ export class CheckPrototypeComponent implements OnInit { ...@@ -100,7 +93,6 @@ export class CheckPrototypeComponent implements OnInit {
(res) => { (res) => {
const data = res.data[0]; const data = res.data[0];
data.type += ''; data.type += '';
data.interfaceid += '';
data.value_type += ''; data.value_type += '';
if (data.applications) { if (data.applications) {
data.applications = data.applications.map(e => { data.applications = data.applications.map(e => {
...@@ -111,12 +103,6 @@ export class CheckPrototypeComponent implements OnInit { ...@@ -111,12 +103,6 @@ export class CheckPrototypeComponent implements OnInit {
} }
); );
//主机接口
this.overAllSer.findInterface(this.hostId).subscribe(
(res) => {
this.interfaceList = res.data;
}
);
this.getItemType(); this.getItemType();
} }
......
...@@ -38,7 +38,6 @@ export class TemplateComponent implements OnInit { ...@@ -38,7 +38,6 @@ export class TemplateComponent implements OnInit {
selectedValue; selectedValue;
isCheck = false; isCheck = false;
allChecked = false; allChecked = false;
interfaceList: any[];
hostId; hostId;
isKey = false; isKey = 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