Commit ea376401 authored by wangqinghua's avatar wangqinghua

update

parent 752f9630
...@@ -16,8 +16,10 @@ ...@@ -16,8 +16,10 @@
</nz-breadcrumb> </nz-breadcrumb>
</div> </div>
<div nz-col nzSpan="10" class="search-input text-right"> <div nz-col nzSpan="10" class="search-input text-right">
<input (keyup.enter)="search('')" type="text" nz-input [(ngModel)]="searchName" placeholder="输入资源名称"> <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> <button (click)="search('')" nz-button nzType="default"><i class="anticon anticon-search"
style="color: #6097b7"></i>搜索
</button>
</div> </div>
<div nz-col nzSpan="2" class="text-right"> <div nz-col nzSpan="2" class="text-right">
<button (click)="ngOnInit()" nz-button nzType="primary"><i class="anticon anticon-sync"></i></button> <button (click)="ngOnInit()" nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
...@@ -41,7 +43,7 @@ ...@@ -41,7 +43,7 @@
<i *ngIf="!red && red != 0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!red && red != 0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{red}} {{red}}
</span> </span>
<span (click)="search('1')"> <nz-tag [nzColor]="color.gray"></nz-tag> <span (click)="search('1')"> <nz-tag [nzColor]="color.gray"></nz-tag>
<i *ngIf="!gray && gray!=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!gray && gray!=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{gray}} {{gray}}
</span> </span>
...@@ -54,11 +56,15 @@ ...@@ -54,11 +56,15 @@
</div> </div>
<div nz-col nzSpan="12" class="text-right"> <div nz-col nzSpan="12" class="text-right">
<button nz-button nzType="default" (click)="showGroupModal()" *ngIf="selectedValue == 'group'"> <button nz-button nzType="default" (click)="showGroupModal()" *ngIf="selectedValue == 'group'">
<i class="anticon anticon-plus-circle-o"></i>添加分组 <i class="anticon anticon-plus-circle-o"></i>添加分组
</button>
<button (click)="openBatchHost(1,'停止')" nz-button nzType="default"><i
class="anticon anticon-pause-circle-o"></i>停止监控
</button>
<button (click)="openBatchHost(0,'开启')" nz-button nzType="default"><i class="anticon anticon-play-circle-o"></i>开启监控
</button>
<button (click)="batchDeleteConfirm()" nz-button nzType="default"><i class="anticon anticon-close-circle-o"></i>删除资源
</button> </button>
<button (click)="openBatchHost(1,'停止')" nz-button nzType="default"><i class="anticon anticon-pause-circle-o"></i>停止监控</button>
<button (click)="openBatchHost(0,'开启')" nz-button nzType="default"><i class="anticon anticon-play-circle-o"></i>开启监控</button>
<button (click)="batchDeleteConfirm()" nz-button nzType="default"><i class="anticon anticon-close-circle-o"></i>删除资源</button>
</div> </div>
</div> </div>
<nz-table #nzTable [nzData]="dataSet" nzSingleSort [nzLoading]="loading" [nzShowPagination]="frontPagination"> <nz-table #nzTable [nzData]="dataSet" nzSingleSort [nzLoading]="loading" [nzShowPagination]="frontPagination">
...@@ -101,11 +107,12 @@ ...@@ -101,11 +107,12 @@
<td class="round-tag tag-form default"> <td class="round-tag tag-form default">
<ng-container *ngIf="item.status == 1"> <ng-container *ngIf="item.status == 1">
<nz-tag [nzColor]="color.gray"></nz-tag> <nz-tag [nzColor]="color.gray"></nz-tag>
</ng-container> </ng-container>
<ng-container *ngIf="item.status == 0"> <ng-container *ngIf="item.status == 0">
<nz-tag *ngIf="item.maxLevel == 4 || item.maxLevel == 5" [nzColor]="color.red"></nz-tag> <nz-tag *ngIf="item.maxLevel == 4 || item.maxLevel == 5" [nzColor]="color.red"></nz-tag>
<nz-tag *ngIf="item.maxLevel == 2 || item.maxLevel == 3" [nzColor]="color.yellow"></nz-tag> <nz-tag *ngIf="item.maxLevel == 2 || item.maxLevel == 3"
[nzColor]="color.yellow"></nz-tag>
<nz-tag *ngIf="item.maxLevel < 2 " [nzColor]="color.green"></nz-tag> <nz-tag *ngIf="item.maxLevel < 2 " [nzColor]="color.green"></nz-tag>
</ng-container> </ng-container>
...@@ -114,8 +121,8 @@ ...@@ -114,8 +121,8 @@
<span (click)="goTOInventory(item?.inventory?.id)">{{item?.inventory?.name}}</span> <span (click)="goTOInventory(item?.inventory?.id)">{{item?.inventory?.name}}</span>
</td> </td>
<!--<td class="round-tag tag-form" >--> <!--<td class="round-tag tag-form" >-->
<!--<nz-tag *ngIf="item.status == 0" [nzColor]="color.green"></nz-tag>--> <!--<nz-tag *ngIf="item.status == 0" [nzColor]="color.green"></nz-tag>-->
<!--<nz-tag *ngIf="item.status == 1" [nzColor]="color.gray"></nz-tag>--> <!--<nz-tag *ngIf="item.status == 1" [nzColor]="color.gray"></nz-tag>-->
<!--</td>--> <!--</td>-->
<td class="default"> <td class="default">
<ng-container *ngIf="item.level"> <ng-container *ngIf="item.level">
...@@ -210,18 +217,19 @@ ...@@ -210,18 +217,19 @@
<td class="round-tag tag-form"> <td class="round-tag tag-form">
<ng-container *ngIf="item.status == 1"> <ng-container *ngIf="item.status == 1">
<nz-tag [nzColor]="color.gray"></nz-tag> <nz-tag [nzColor]="color.gray"></nz-tag>
</ng-container> </ng-container>
<ng-container *ngIf="item.status == 0"> <ng-container *ngIf="item.status == 0">
<nz-tag *ngIf="item.maxLevel == 4 || item.maxLevel == 5" [nzColor]="color.red"></nz-tag> <nz-tag *ngIf="item.maxLevel == 4 || item.maxLevel == 5" [nzColor]="color.red"></nz-tag>
<nz-tag *ngIf="item.maxLevel == 2 || item.maxLevel == 3" [nzColor]="color.yellow"></nz-tag> <nz-tag *ngIf="item.maxLevel == 2 || item.maxLevel == 3"
[nzColor]="color.yellow"></nz-tag>
<nz-tag *ngIf="item.maxLevel < 2 " [nzColor]="color.green"></nz-tag> <nz-tag *ngIf="item.maxLevel < 2 " [nzColor]="color.green"></nz-tag>
</ng-container> </ng-container>
</td> </td>
<td>{{item?.inventory?.name}}</td> <td>{{item?.inventory?.name}}</td>
<!--<nz-tag *ngIf="item.status == 0" [nzColor]="color.green"></nz-tag>--> <!--<nz-tag *ngIf="item.status == 0" [nzColor]="color.green"></nz-tag>-->
<!--<nz-tag *ngIf="item.status == 1" [nzColor]="color.gray"></nz-tag>--> <!--<nz-tag *ngIf="item.status == 1" [nzColor]="color.gray"></nz-tag>-->
<td class="default"> <td class="default">
<ng-container *ngIf="item.level"> <ng-container *ngIf="item.level">
<ng-container *ngIf="item.available == 0"> <ng-container *ngIf="item.available == 0">
...@@ -281,7 +289,8 @@ ...@@ -281,7 +289,8 @@
<li (click)="showTempStop(item)" nz-menu-item><a>临时暂停</a></li> <li (click)="showTempStop(item)" nz-menu-item><a>临时暂停</a></li>
<li (click)="openHost(item)" nz-menu-item><a> <li (click)="openHost(item)" nz-menu-item><a>
<ng-container *ngIf="item.status == 1">开启</ng-container> <ng-container *ngIf="item.status == 1">开启</ng-container>
<ng-container *ngIf="item.status == 0">停止</ng-container>监控 <ng-container *ngIf="item.status == 0">停止</ng-container>
监控
</a></li> </a></li>
<li nz-menu-item (click)="goDetail(item)"><a>查看监测点</a></li> <li nz-menu-item (click)="goDetail(item)"><a>查看监测点</a></li>
<li (click)="showAlarm(item)" nz-menu-item><a>添加告警</a></li> <li (click)="showAlarm(item)" nz-menu-item><a>添加告警</a></li>
...@@ -305,11 +314,11 @@ ...@@ -305,11 +314,11 @@
</td> </td>
<td class="round-tag tag-form default"> <td class="round-tag tag-form default">
<ng-container *ngIf="item.status == 1"> <ng-container *ngIf="item.status == 1">
<nz-tag [nzColor]="color.gray"></nz-tag> <nz-tag [nzColor]="color.gray"></nz-tag>
</ng-container> </ng-container>
<ng-container *ngIf="item.status == 0"> <ng-container *ngIf="item.status == 0">
<nz-tag *ngIf="item.maxLevel == 4 || item.maxLevel == 5" [nzColor]="color.red"></nz-tag> <nz-tag *ngIf="item.maxLevel == 4 || item.maxLevel == 5" [nzColor]="color.red"></nz-tag>
<nz-tag *ngIf="item.maxLevel == 2 || item.maxLevel == 3" [nzColor]="color.yellow"></nz-tag> <nz-tag *ngIf="item.maxLevel == 2 || item.maxLevel == 3" [nzColor]="color.yellow"></nz-tag>
<nz-tag *ngIf="item.maxLevel < 2 " [nzColor]="color.green"></nz-tag> <nz-tag *ngIf="item.maxLevel < 2 " [nzColor]="color.green"></nz-tag>
</ng-container> </ng-container>
...@@ -317,45 +326,45 @@ ...@@ -317,45 +326,45 @@
<td>{{item?.inventory?.name}}</td> <td>{{item?.inventory?.name}}</td>
<td class="default"> <td class="default">
<ng-container *ngIf="item.available == 0"> <ng-container *ngIf="item.available == 0">
<nz-tag>AGENT</nz-tag> <nz-tag>AGENT</nz-tag>
</ng-container> </ng-container>
<ng-container *ngIf="item.available == 1"> <ng-container *ngIf="item.available == 1">
<nz-tag [nzColor]="'#3bae6a'">AGENT</nz-tag> <nz-tag [nzColor]="'#3bae6a'">AGENT</nz-tag>
</ng-container> </ng-container>
<ng-container *ngIf="item.available == 2"> <ng-container *ngIf="item.available == 2">
<nz-tag [nzColor]="'#d44f51'">AGENT</nz-tag> <nz-tag [nzColor]="'#d44f51'">AGENT</nz-tag>
</ng-container> </ng-container>
<ng-container *ngIf="item.snmp_available == 0"> <ng-container *ngIf="item.snmp_available == 0">
<nz-tag>SNMP</nz-tag> <nz-tag>SNMP</nz-tag>
</ng-container> </ng-container>
<ng-container *ngIf="item.snmp_available == 1"> <ng-container *ngIf="item.snmp_available == 1">
<nz-tag [nzColor]="'#3bae6a'">SNMP</nz-tag> <nz-tag [nzColor]="'#3bae6a'">SNMP</nz-tag>
</ng-container> </ng-container>
<ng-container *ngIf="item.snmp_available == 2"> <ng-container *ngIf="item.snmp_available == 2">
<nz-tag [nzColor]="'#d44f51'">SNMP</nz-tag> <nz-tag [nzColor]="'#d44f51'">SNMP</nz-tag>
</ng-container> </ng-container>
<ng-container *ngIf="item.jmx_available == 0"> <ng-container *ngIf="item.jmx_available == 0">
<nz-tag>JMX</nz-tag> <nz-tag>JMX</nz-tag>
</ng-container> </ng-container>
<ng-container *ngIf="item.jmx_available == 1"> <ng-container *ngIf="item.jmx_available == 1">
<nz-tag [nzColor]="'#3bae6a'">JMX</nz-tag> <nz-tag [nzColor]="'#3bae6a'">JMX</nz-tag>
</ng-container> </ng-container>
<ng-container *ngIf="item.jmx_available == 2"> <ng-container *ngIf="item.jmx_available == 2">
<nz-tag [nzColor]="'#d44f51'">JMX</nz-tag> <nz-tag [nzColor]="'#d44f51'">JMX</nz-tag>
</ng-container> </ng-container>
<ng-container *ngIf="item.ipmi_available == 0"> <ng-container *ngIf="item.ipmi_available == 0">
<nz-tag>IPMI</nz-tag> <nz-tag>IPMI</nz-tag>
</ng-container> </ng-container>
<ng-container *ngIf="item.ipmi_available == 1"> <ng-container *ngIf="item.ipmi_available == 1">
<nz-tag [nzColor]="'#3bae6a'">IPMI</nz-tag> <nz-tag [nzColor]="'#3bae6a'">IPMI</nz-tag>
</ng-container> </ng-container>
<ng-container *ngIf="item.ipmi_available == 2"> <ng-container *ngIf="item.ipmi_available == 2">
<nz-tag [nzColor]="'#d44f51'">IPMI</nz-tag> <nz-tag [nzColor]="'#d44f51'">IPMI</nz-tag>
</ng-container> </ng-container>
</td> </td>
<td class="handle"> <td class="handle">
<span (click)="showBasicCheckModal(item.hostid,item.host)">添加监测点</span> <span (click)="showBasicCheckModal(item.hostid,item.host)">添加监测点</span>
...@@ -368,7 +377,8 @@ ...@@ -368,7 +377,8 @@
<li (click)="showTempStop(item)" nz-menu-item><a>临时暂停</a></li> <li (click)="showTempStop(item)" nz-menu-item><a>临时暂停</a></li>
<li (click)="openHost(item)" nz-menu-item><a> <li (click)="openHost(item)" nz-menu-item><a>
<ng-container *ngIf="item.status == 1">开启</ng-container> <ng-container *ngIf="item.status == 1">开启</ng-container>
<ng-container *ngIf="item.status == 0">停止</ng-container>监控 <ng-container *ngIf="item.status == 0">停止</ng-container>
监控
</a></li> </a></li>
<li nz-menu-item (click)="goDetail(item)"><a>查看监测点</a></li> <li nz-menu-item (click)="goDetail(item)"><a>查看监测点</a></li>
<li (click)="showAlarm(item)" nz-menu-item><a>添加告警</a></li> <li (click)="showAlarm(item)" nz-menu-item><a>添加告警</a></li>
......
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
<button (click)="showAddModal()" nz-button nzType="default"><i class="anticon anticon-plus-circle-o"></i>新增事件</button> <button (click)="showAddModal()" nz-button nzType="default"><i class="anticon anticon-plus-circle-o"></i>新增事件</button>
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="2">
<nz-select style="width: 100%;" [(ngModel)]="obj.type" nzPlaceHolder="事件分类"> <nz-select style="width: 100%;" [(ngModel)]="obj.type" nzPlaceHolder="事件分类">
<ng-container *ngFor="let item of eventTypeList"> <ng-container *ngFor="let item of eventTypeList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option> <nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container> </ng-container>
</nz-select> </nz-select>
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="2">
<nz-select style="width: 100%;" [(ngModel)]="obj.status" nzPlaceHolder="事件状态"> <nz-select style="width: 100%;" [(ngModel)]="obj.status" nzPlaceHolder="事件状态">
<nz-option nzLabel="待处理" nzValue="0"></nz-option> <nz-option nzLabel="待处理" nzValue="0"></nz-option>
<nz-option nzLabel="已结束" nzValue="1"></nz-option> <nz-option nzLabel="已结束" nzValue="1"></nz-option>
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
<div nz-col nzSpan="4"> <div nz-col nzSpan="4">
<input type="text" nz-input [(ngModel)]="obj.searchStr" placeholder="事件编号/处理人"> <input type="text" nz-input [(ngModel)]="obj.searchStr" placeholder="事件编号/处理人">
</div> </div>
<div nz-col nzSpan="2">
<button (click)="search()" nz-button nzType="default"><i class="anticon anticon-search" style="color: #6097b7"></i>搜索</button>
</div>
</div> </div>
<nz-table #nzTable [nzData]="eventList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)"> <nz-table #nzTable [nzData]="eventList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)">
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
border-top: 1px solid #dddddd; border-top: 1px solid #dddddd;
} }
.search-form .ant-input{ .search-form .ant-input{
width: initial; width: 100%;
} }
.search-input .ant-input{ .search-input .ant-input{
width: 60%; width: 60%;
......
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