Commit 9a8a65c0 authored by wangqinghua's avatar wangqinghua

update

parent eb661895
<div class="logo padding-40">智能监控平台</div>
<div class="logo padding-40">运维管理系统</div>
<ul nz-menu [nzMode]="'inline'">
<ng-container *ngFor="let item of menuList">
<li nz-submenu (nzOpenChange)="openHandler(item)" [(nzOpen)]="item.checked">
......
......@@ -31,18 +31,6 @@
<nz-form-explain *ngIf="validateForm.get('type').dirty && validateForm.get('type').errors">请选择监测点类型!</nz-form-explain>
</nz-form-control>
</nz-form-item>
<ng-container *ngIf="isInterface">
<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>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired nzFor="key_">键值</nz-form-label>
<nz-form-control [nzSpan]="14">
......
......@@ -17,11 +17,9 @@ export class DiscoveryComponent implements OnInit {
title;
isVisiable = false;
isInterface = true;
nzSize = 'large';
hostId; //主机ID
itemId; //监控项id
interfaceList: any[];
valueMapList = [];
validateForm: FormGroup;
checkList; //监测点分类
......@@ -44,7 +42,6 @@ export class DiscoveryComponent implements OnInit {
snmp_oid: ['interfaces.ifTable.ifEntry.ifInOctets.1'],
snmp_community: ['public'],
port: [this.hostId],
interfaceid: [null,],
delay: [null, [Validators.required]],
description: [null],
lifetime: ['3600'],
......@@ -57,12 +54,6 @@ export class DiscoveryComponent implements OnInit {
this.title = title;
this.isVisiable = true;
this.hostId = hostId;
//主机接口
this.overAllSer.findInterface(this.hostId).subscribe(
(res) => {
this.interfaceList = res.data;
}
);
}
//编辑
......@@ -75,18 +66,10 @@ export class DiscoveryComponent implements OnInit {
(res) => {
const data = res.data[0];
data.type += '';
data.interfaceid += '';
data.value_type += '';
this.validateForm.patchValue(data);
}
);
//主机接口
this.overAllSer.findInterface(this.hostId).subscribe(
(res) => {
this.interfaceList = res.data;
}
);
}
//添加
......@@ -101,9 +84,9 @@ export class DiscoveryComponent implements OnInit {
}
let d = this.validateForm.value.status == true ? 1 : 0;
this.validateForm.patchValue({
status:d
status:d,
hostid:this.hostId
})
this.validateForm.value.hostid = this.hostId;
if (this.title == '添加自动发现') {
this.create();
}
......
......@@ -50,7 +50,7 @@
<td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="selectItem(data,$event)"></td>
<td class="round-tag tag-form">{{data.name}}</td>
<td>{{data.key_}}</td>
<td>{{data.usedcount}}</td>
<td>{{data.delay}}</td>
<td>
<span *ngIf="data.status == 0">启用</span>
<span *ngIf="data.status == 1">禁用</span>
......
<div class="background">
<div class="login-center">
<div class="login-logo">
<img src="../../../content/images/logo.png" alt="智能监控平台">
<img src="../../../content/images/logo-hongqiao.png" alt="智能监控平台">
</div>
<form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()">
<nz-form-item>
......
......@@ -13,11 +13,12 @@ var SysUtil = {
var localhostPath = curWwwPath.substring(0, pos)
// 获取带"/"的项目名,如:/uimcardprj
var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 2)
return localhostPath + projectName
return localhostPath;
}
}
// url根路径
var rootPath = "http://10.10.38.99:8282";
var rootPath = SysUtil.getRootPath();
// var topoImgPath = 'javascript/jtopo/img/';
var topoImgPath = rootPath + '/file/icon/';
/*
......
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