Commit e45d61e3 authored by wangqinghua's avatar wangqinghua

update

parent 6d6349eb
......@@ -124,13 +124,17 @@ export class BasiCheckComponent implements OnInit {
}
//编辑
showEditModal(hostId, id, hostName,templateid) {
this.title = '编辑监测点';
showEditModal(hostId, id, hostName,templateid,title) {
this.title = title;
this.hostId = hostId;
this.templateid = templateid;
this.isCheck = true;
this.itemId = id;
this.hostName = hostName;
if(this.title == '编辑模版监测点'){
this.isInterface = false;
this.validateForm.get('interfaceid').clearValidators();
}
this.overAllSer.findItemDetail(id).subscribe(
(res) => {
const data = res.data[0];
......
......@@ -2,7 +2,7 @@
<nz-modal [(nzVisible)]="isNode" nzTitle="节点" (nzOnCancel)="handleNodeCancel()" (nzOnOk)="handleNodeOk()">
<div nz-form class="ant-advanced-search-form form-select">
<nz-form-item>
<nz-form-label [nzSpan]="7" nzFor="group" >设备名称</nz-form-label>
<nz-form-label [nzSpan]="7" nzFor="group" >显示名称</nz-form-label>
<nz-form-control [nzSpan]="12">
<input nz-input type="text" [(ngModel)]="name">
</nz-form-control>
......
......@@ -645,7 +645,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//编辑监测点
showEditModal(item){
this.smartCheck.showEditModal(this.hostId,item.itemid,this.realName,item.templateid);
this.smartCheck.showEditModal(this.hostId,item.itemid,this.realName,item.templateid,'编辑监测点');
}
//添加阈值
......
......@@ -162,12 +162,12 @@ export class ItemListComponent implements OnInit {
//添加监测点
showAddModal(){
this.smartBasiCheck.showAddModal(this.hostId,this.tempName,"添加监测点");
this.smartBasiCheck.showAddModal(this.hostId,this.tempName,"添加模版监测点");
}
//编辑监测点
showEditModal(item){
this.smartBasiCheck.showEditModal(this.hostId,item.itemid,this.tempName,item.templateid);
this.smartBasiCheck.showEditModal(this.hostId,item.itemid,this.tempName,item.templateid,'编辑模版监测点');
}
}
......@@ -35,12 +35,12 @@
</button>
</div>
</div>
<nz-table #nzTable [nzData]="dataSet" nzSingleSort [nzLoading]="loading" [nzShowPagination]="frontPagination">
<nz-table #nzTable [nzData]="dataSet" nzSingleSort [nzLoading]="isLoading" [nzShowPagination]="frontPagination">
<thead>
<tr>
<th [nzChecked]="allChecked"></th>
<th>名称</th>
<th>描述</th>
<th nzWidth="20%">名称</th>
<th nzWidth="20%">描述</th>
<th>自动发现</th>
<th>监控项</th>
<th>阈值</th>
......@@ -92,8 +92,6 @@
<span (click)="showDeleteGroupConfirm(item)">删除</span>
</ng-container>
<ng-container *ngIf="item.level">
<!--<span (click)="showBasicCheckModal(item.templateid,item.host)">添加监测点</span>-->
<!--<span (click)="showDiscoveryAddModal(item)">添加自动发现</span>-->
<span (click)="showTempEditModal(item)">编辑</span>
<span (click)="showDeleteConfirm(item)">删除</span>
</ng-container>
......@@ -123,11 +121,8 @@
<span (click)="goToTri(item)">{{item.triggersCount}}</span>
</td>
<td class="handle main-color">
<!--<span (click)="showBasicCheckModal(item.templateid,item.host)">添加监测点</span>-->
<span (click)="showDiscoveryAddModal(item.templateid,item.host)">添加自动发现</span>
<span (click)="editBasicModal(item)">编辑</span>
<span (click)="showTempEditModal(item)">编辑</span>
<span (click)="showDeleteConfirm(item)">删除</span>
<!--<span (click)="showAlarm(item)">添加告警</span>-->
</td>
</tr>
</ng-container>
......
......@@ -32,7 +32,7 @@ export class TemplateComponent implements OnInit {
color = color;
//表格信息
loading = false;
isLoading = false;
frontPagination = true;
selectedValue;
......@@ -123,22 +123,24 @@ export class TemplateComponent implements OnInit {
}
//获取模版组
getTemplateGroup(){
getTemplateGroup() {
this.isLoading = true;
this.overAllSer.getTemplateGroups().subscribe(
(res)=>{
(res) => {
this.dataSet = res.data;
this.isLoading = false;
for (let i = 0; i < this.dataSet.length; i++) {
this.dataSet[i].host = i;
this.dataSet[i].checked = false;
}
this.toTree(null);
}
)
);
}
//搜索
search() {
this.loading = true;
this.isLoading = true;
this.searchStatus = true;
this.frontPagination = false;
const data = {
......@@ -151,7 +153,7 @@ export class TemplateComponent implements OnInit {
if (res.errCode == 10000) {
this.searchData = res.data;
}
this.loading = false;
this.isLoading = false;
}
);
}
......@@ -164,26 +166,26 @@ export class TemplateComponent implements OnInit {
//添加模版
showTempAddModal() {
this.smartStrategy.showAddModal("添加模版");
this.smartStrategy.showAddModal('添加模版');
}
//编辑模版
showTempEditModal(item) {
this.smartStrategy.showEditModal("编辑模版", item.templateid);
this.smartStrategy.showEditModal('编辑模版', item.templateid);
}
//模版监测点
showBasicCheckModal(hostid, host) {
this.smartCheck.showAddModal(hostid, host,"添加模版监测点");
this.smartCheck.showAddModal(hostid, host, '添加模版监测点');
}
//添加自动发现
showDiscoveryAddModal(item){
this.smartDiscovery.showAddModal(item.templateid,"添加自动发现")
showDiscoveryAddModal(item) {
this.smartDiscovery.showAddModal(item.templateid, '添加自动发现');
}
//goto 自动发现页面
goToDiscovery(item){
goToDiscovery(item) {
this.router.navigate(['app/main/discoveryList'], {
queryParams: {
templateid: item.templateid,
......@@ -194,7 +196,7 @@ export class TemplateComponent implements OnInit {
}
//goto 监控项列表
goToItem(item){
goToItem(item) {
this.router.navigate(['app/main/itemList'], {
queryParams: {
templateid: item.templateid,
......@@ -205,7 +207,7 @@ export class TemplateComponent implements OnInit {
}
//goto阈值列表
goToTri(item){
goToTri(item) {
this.router.navigate(['app/main/triList'], {
queryParams: {
templateid: item.templateid,
......@@ -277,7 +279,7 @@ export class TemplateComponent implements OnInit {
}
return false;
}
this.loading = true;
this.isLoading = true;
const data = {
'groupids': [item.groupid],
};
......@@ -289,7 +291,7 @@ export class TemplateComponent implements OnInit {
} else {
this.message.info('该分组下无资源');
}
this.loading = false;
this.isLoading = false;
}
);
}
......@@ -304,7 +306,7 @@ export class TemplateComponent implements OnInit {
}
return false;
}
this.loading = true;
this.isLoading = true;
const data = {
type: item.equipmentTypeId
};
......@@ -316,7 +318,7 @@ export class TemplateComponent implements OnInit {
} else {
this.message.info('该分组下无资源');
}
this.loading = false;
this.isLoading = false;
}
);
}
......
......@@ -1040,7 +1040,7 @@ editor.utils = {
img = "icon_virtual_host.png"; // 默认图片
}
if (!text) {
text = "图片"; // 默认标签
text = ""; // 默认标签
}
var node = new JTopo.Node()
node.fontColor = editor.config.nodeFontColor
......
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