This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #547 from lucasponce/AlertsCenterWork
Add basic pagination into AlertsCenter
- Loading branch information
Showing
5 changed files
with
96 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
132 changes: 73 additions & 59 deletions
132
console/src/main/scripts/plugins/metrics/html/alerts-center-list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,85 @@ | ||
<div class="hk-alert-center"> | ||
<h1 class="text-center">Alert Center</h1> | ||
<div class="hk-screen-content"> | ||
|
||
<!-- No Alerts --> | ||
<div ng-show="ac.alertsList.length === 0"> | ||
<div class="hk-info-top clearfix"> | ||
<h3>Alerts ({{ac.alertsList.length}})</h3> | ||
</div> | ||
<div class="blank-slate-pf"> | ||
<div class="blank-slate-pf-icon"> | ||
<i class="fa fa-flag"></i> | ||
<hawkular-subtab ng-controller="Subtab.SubtabController"> | ||
</hawkular-subtab> | ||
|
||
<div class="hk-alert-center"> | ||
<h1 class="text-center">Alert Center</h1> | ||
|
||
<!-- No Alerts --> | ||
<div ng-show="ac.alertsList.length === 0"> | ||
<div class="hk-info-top clearfix"> | ||
<h3>Alerts ({{ac.alertsList.length}})</h3> | ||
</div> | ||
<div class="blank-slate-pf"> | ||
<div class="blank-slate-pf-icon"> | ||
<i class="fa fa-flag"></i> | ||
</div> | ||
<h1>No Alerts.</h1> | ||
</div> | ||
<h1>No Alerts.</h1> | ||
</div> | ||
</div> | ||
|
||
<!-- have alerts --> | ||
<div ng-show="ac.alertsList.length > 0"> | ||
<!-- have alerts --> | ||
<div ng-show="ac.alertsList.length > 0"> | ||
|
||
<div class="hk-info-top clearfix"> | ||
<h3 class="pull-left">Alerts ({{ac.alertsList.length}})</h3> | ||
<div class="hk-info-top clearfix"> | ||
<h3 class="pull-left">Alerts ({{ac.headerLinks.total}})</h3> | ||
<span class="hk-update pull-right" data-toggle="tooltip" data-placement="top" title="Last update"> | ||
<i class="fa fa-clock-o" ng-click="ac.getAlerts()"></i>{{ac.lastUpdateDate | date:'HH:mm'}}</span> | ||
</div> | ||
<div class="hk-table-container"> | ||
<div class="hk-actions-table"> | ||
<button class="btn btn-default" type="button" ng-click="ac.ackSelected()" | ||
ng-disabled="!ac.hasOpenSelectedItems || ac.isWorking">Acknowledge | ||
</button> | ||
<button class="btn btn-primary" type="button" ng-click="ac.resolveSelected()" | ||
ng-disabled="ac.selectCount < 1 || ac.isWorking || ac.hasResolvedItems()">Resolve | ||
</button> | ||
</div> | ||
<table class="datatable table table-bordered hk-table-alerts hk-table-detailed hk-table-select"> | ||
<thead> | ||
<tr> | ||
<th ng-click="ac.selectAll()"><input type="checkbox"/></th> | ||
<th>State</th> | ||
<th>Severity</th> | ||
<th>Description</th> | ||
<th>Created</th> | ||
<th>Resource Path</th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-repeat="alert in ac.alertsList" ng-class="{'hk-selected': ac.selected}" | ||
ng-click="ac.selectItem(alert)"> | ||
<td><input type="checkbox" ng-checked="alert.selected"/></td> | ||
<td ng-class="{'hk-bold': alert.status === 'OPEN'}">{{alert.status|firstUpper}}</td> | ||
<td>{{alert.severity|firstUpper}}</td> | ||
<td>{{alert.trigger.description| characters: 35}}</td> | ||
<td>{{alert.ctime | date:'d MMM yyyy, HH:mm'}}</td> | ||
<td>{{alert.context.resourcePath | truncate: 30}}</td> | ||
<td><a class="btn btn-link"><i class="fa fa-chevron-circle-right fa-lg" | ||
tooltip="View Details" tooltip-trigger tooltip-placement="top" | ||
ng-click="ac.showDetailPage(alert.alertId)"> | ||
</i></a> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<div class="dataTables_footer"> | ||
<hk-data-pagination resource-list="ac.alertsList" current-page="ac.alertsCurPage" | ||
page-setter="ac.setPage(pageNumber)" | ||
per-page="ac.alertsPerPage" headers="ac.headerLinks"></hk-data-pagination> | ||
|
||
<div class="hk-table-container"> | ||
<div class="hk-actions-table"> | ||
<button class="btn btn-default" type="button" ng-click="ac.ackSelected()" | ||
ng-disabled="!ac.hasOpenSelectedItems || ac.isWorking">Acknowledge | ||
</button> | ||
<button class="btn btn-primary" type="button" ng-click="ac.resolveSelected()" | ||
ng-disabled="ac.selectCount < 1 || ac.isWorking || ac.hasResolvedItems()">Resolve | ||
</button> | ||
</div> | ||
<div class="dataTables_header"> | ||
<div id="DataTables_Table_0_filter" class="dataTables_filter"> | ||
<label><input type="search" ng-model="ac.search" aria-controls="DataTables_Table_0"></label> | ||
</div> | ||
<div class="dataTables_info" id="DataTables_Table_0_info" role="status" aria-live="polite">Showing <b>1</b> to <b>{{(ac.alertsList | filter:ac.search).length}}</b> of <b>{{ac.alertsList.length}}</b> Items</div> | ||
</div> | ||
<table class="datatable table table-bordered hk-table-alerts hk-table-detailed hk-table-select"> | ||
<thead> | ||
<tr> | ||
<th ng-click="ac.selectAll()"><input type="checkbox"/></th> | ||
<th>State</th> | ||
<th>Severity</th> | ||
<th>Description</th> | ||
<th>Created</th> | ||
<th>Resource Path</th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-repeat="alert in ac.alertsList | filter:ac.search" ng-class="{'hk-selected': ac.selected}" | ||
ng-click="ac.selectItem(alert)"> | ||
<td><input type="checkbox" ng-checked="alert.selected"/></td> | ||
<td ng-class="{'hk-bold': alert.status === 'OPEN'}">{{alert.status|firstUpper}}</td> | ||
<td>{{alert.severity|firstUpper}}</td> | ||
<td>{{alert.trigger.description| characters: 35}}</td> | ||
<td>{{alert.ctime | date:'d MMM yyyy, HH:mm'}}</td> | ||
<td>{{alert.context.resourcePath | truncate: 30}}</td> | ||
<td><a class="btn btn-link"><i class="fa fa-chevron-circle-right fa-lg" | ||
tooltip="View Details" tooltip-trigger tooltip-placement="top" | ||
ng-click="ac.showDetailPage(alert.alertId)"> | ||
</i></a> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<div class="dataTables_footer"> | ||
<hk-data-pagination resource-list="ac.alertsList" current-page="ac.alertsCurPage" | ||
page-setter="ac.setPage(pageNumber)" | ||
per-page="ac.alertsPerPage" headers="ac.headerLinks"></hk-data-pagination> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters