Newer
Older
<nz-breadcrumb class="padding-8-0">
<nz-breadcrumb-item>
首页
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>综合监控</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<div nz-col nzSpan="4">
<nz-select style="width: 200px;" nzPlaceHolder="按组分开" [(ngModel)]="selectedValue"
(ngModelChange)="select($event)">
<nz-option nzLabel="按设备类型展开" nzValue="type"></nz-option>
<nz-option nzLabel="按资源分组展开" nzValue="group"></nz-option>
</nz-select>
</div>
<nz-select nzAllowClear *ngIf="selectedValue == 'group'" style="width: 200px;" nzPlaceHolder="所有分组" nzShowSearch
(ngModelChange)="changeGroup($event)" [(ngModel)]="groupid">
<ng-container *ngFor="let item of groupList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container>
</nz-select>
<nz-select *ngIf="selectedValue == 'type'" style="width: 200px;" nzPlaceHolder="所有设备类型" nzShowSearch
(ngModelChange)="changeEquiment($event)" [(ngModel)]="equipmentTypeid">
<ng-container *ngFor="let item of groupList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
<input (keyup.enter)="search()" type="text" nz-input [(ngModel)]="searchName" placeholder="输入资源名称">
<button (click)="search()" nz-button nzType="default"><i class="anticon anticon-search"
style="color: #6097b7"></i>搜索
<button (click)="ngOnInit()" nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
<span [ngClass]="{'select-border': status == '正常'}" (click)="changeStatus('正常')" style="margin-right: 8px"> <nz-tag
class="tag-green" [nzColor]="color.green"></nz-tag>
<i *ngIf="!green && green !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
<span [ngClass]="{'select-border': status == '告警'}" (click)="changeStatus('告警')" style="margin-right: 8px"> <nz-tag
class="tag-yellow" [nzColor]="color.yellow"></nz-tag>
<i *ngIf="!yellow && yellow != 0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{yellow}}
</span>
<span [ngClass]="{'select-border': status == '严重'}" (click)="changeStatus('严重')" style="margin-right: 8px"> <nz-tag
class="tag-red" [nzColor]="color.red"></nz-tag>
<i *ngIf="!red && red != 0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{red}}
</span>
<span [ngClass]="{'select-border': status == '禁用'}" (click)="changeStatus('禁用')"> <nz-tag
[nzColor]="color.gray"></nz-tag>
<i *ngIf="!gray && gray!=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{gray}}
</span>
<button nz-button nzType="default" (click)="showGroupModal()">
<button nz-button nzType="default" (click)="showDeleteGroupConfirm()">
<button nz-button nzType="default" (click)="showBasicEditModal()">
<nz-table #nzTable [nzData]="dataSet" [nzLoading]="loading" [nzFrontPagination]="false" [nzShowPagination]="true"
[nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount"
(nzPageIndexChange)="change($event)">
<thead>
<tr>
<th>名称</th>
<th>状态</th>
<th>设备类型</th>
<th>可用性</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<ng-container *ngFor="let item of nzTable.data">
<td class="cursor main-color">
<span (click)="goDetail(item)">{{item.name}}</span>
</td>
<td class="round-tag tag-form">
<ng-container *ngIf="item.status == 1">停止</ng-container>
<ng-container *ngIf="item.status == 0">开启</ng-container>
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
</td>
<td class="default">
<ng-container *ngIf=" !item.snmp_available || item.snmp_available == 0">
<nz-tooltip [nzTitle]="item?.snmp_error">
<nz-tag>SNMP</nz-tag>
</nz-tooltip>
</ng-container>
<ng-container *ngIf="item.snmp_available == 1">
<nz-tag [nzColor]="'#3bae6a'">SNMP</nz-tag>
</ng-container>
<ng-container *ngIf="item.snmp_available == 2">
<nz-tooltip [nzTitle]="item.snmp_error">
<nz-tag nz-tooltip [nzColor]="'#d44f51'">SNMP</nz-tag>
</nz-tooltip>
</ng-container>
<ng-container *ngIf="!item.jmx_available || item.jmx_available == 0">
<nz-tag>JMX</nz-tag>
</ng-container>
<ng-container *ngIf="item.jmx_available == 1">
<nz-tag [nzColor]="'#3bae6a'">JMX</nz-tag>
</ng-container>
<ng-container *ngIf="item.jmx_available == 2">
<nz-tooltip [nzTitle]="item.jmx_error">
<nz-tag nz-tooltip [nzColor]="'#d44f51'">JMX</nz-tag>
</nz-tooltip>
</ng-container>
</td>
<td class="handle main-color">
<!-- <span (click)="showBasicCheckModal(item.hostid,item.host)">添加监测点</span>-->
<span (click)="editBasicModal(item)">编辑</span>
<span (click)="showDeleteConfirm(item)">删除</span>
<ng-container *ngIf="item.status == 1">开启</ng-container><ng-container *ngIf="item.status == 0">停止</ng-container>监控
<!-- 添加资源-->
<smart-basic-edit #basicEdit (done)="handleOk($event)"></smart-basic-edit>
<!--添加监测点-->
<smart-basi-check #smartCheck></smart-basi-check>
<!--添加分组-->
<smart-create-group #smartCreateGroup (add)="handleOk($event)"></smart-create-group>