Commit 1d4935ed authored by wangqinghua's avatar wangqinghua

data.interfaceid += '';

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