Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #478 from lucasponce/Web-Alerts-Tab
Browse files Browse the repository at this point in the history
HAWKULAR-465 Add Web Tab alert dialog for Sessions
  • Loading branch information
mtho11 committed Sep 18, 2015
2 parents 22559e4 + bbd2f25 commit 09911c9
Show file tree
Hide file tree
Showing 6 changed files with 605 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ <h3 class="pull-left">Web Status</h3>
<h3 class="pull-left">
<button class="btn btn-link hk-trigger" ng-click="showAllAlerts = !showAllAlerts" tooltip-trigger tooltip-placement="top" tooltip="Expand/collapse"><i class="fa" ng-show="vm.alertList.length > 0" ng-class="showAllAlerts ? 'fa-minus-square-o' : 'fa-plus-square-o'"></i> Web Alerts <span ng-show="vm.alertList.length > 0">({{showAllAlerts ? vm.alertList.length : vm.math.min(vm.alertList.length, 3)}} of {{vm.alertList.length}})</span></button>
</h3>
<!--<span class="hk-settings pull-right"><a href="#" ng-controller="MetricsAlertController as mac" ng-click="mac.openSetup()"><i class="fa fa-cog"></i>Alert Settings</a></span>-->
<span class="hk-settings pull-right">
<a href="#" ng-controller="WebAlertController as wac" ng-click="wac.openSetup()">
<i class="fa fa-cog"></i>Web Alert Settings
</a>
</span>
</div>
<div class="clearfix">
<!-- No Alerts -->
Expand All @@ -37,11 +41,9 @@ <h3 class="pull-left">
<div>No alerts have been fired in this category and time range.</div>
</div>
<!-- Alerts exist -->
<div class="panel panel-default alert alert-danger" ng-repeat="alert in vm.alertList | limitTo: (showAllAlerts ? 100000 : 3) track by $index">
<div class="hk-alert-icon"><i class="fa fa-flag"></i></div>
<div class="hk-date">{{alert.evalSets[0][0].evalTimestamp | date:'medium' }}</div>
<div class="hk-event"><strong>Alert Summary</strong>: alert details.</div>
</div>
<!-- Alerts exist -->
<hk-alert-panel-list class="clearfix" hk-alert-list="vm.alertList"
hk-limit="(vm.showAllAlerts ? 100000 : 3)"></hk-alert-panel-list>
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,16 @@
<strong>Available Connections</strong>: The number of available connections was {{alert.avg}}.
</div>
<div ng-switch-when="DSRESP">
<strong>Responsiveness</strong>: The connection {{alert.condition}} was {{alert.avg}}ms.
<strong>Responsiveness</strong>: The connection {{alert.condition}} was {{alert.avg}} ms.
</div>
<div ng-switch-when="ACTIVE_SESSIONS">
<strong>Active Web Sessions</strong>: The number of active web sessions was {{alert.avg}}.
</div>
<div ng-switch-when="EXPIRED_SESSIONS">
<strong>Expired Web Sessions</strong>: The number of expired web sessions was {{alert.avg}}.
</div>
<div ng-switch-when="REJECTED_SESSIONS">
<strong>Rejected Web Sessions</strong>: The number of rejected web sessions was {{alert.avg}}.
</div>
<div ng-switch-default>
<strong>Alert</strong>: <code>{{alert}}</code>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<div class="modal-header">
<button type="button" class="close" ng-click="was.cancel()">
<span class="pficon pficon-close"></span>
</button>
<h4 class="modal-title">Web Alert Settings</h4>
</div>
<div class="modal-body hk-alert-settings">
<tabset>
<tab heading="Sessions">

<div id="hk-heap" class="hk-tab-content">
<p>Configure conditions settings for Web Sessions alerts and notifications.</p>

<form class="form-horizontal">
<fieldset>
<legend>Active Sessions Thresholds</legend>
<div class="form-group">
<label class="col-sm-3 control-label" for="active-min">Minimun</label>

<div class="col-sm-5">
<div class="input-group hk-input-small">
<input type="number" min="0" max="10000" ng-model="was.adm.active.activeMinThreshold" class="form-control"
id="active-min" ng-disabled="!was.adm.active.activeMinEnabled">

</div>
</div>
<div class="col-sm-4">
<hk-switch hk-model="was.adm.active.activeMinEnabled"
id="active-min-switch" class="pull-right"></hk-switch>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="active-max">Maximun</label>

<div class="col-sm-5">
<div class="input-group hk-input-small">
<input type="number" min="0" max="10000" ng-model="was.adm.active.activeMaxThreshold"
class="form-control" id="active-max" ng-disabled="!was.adm.active.activeMaxEnabled">

</div>
</div>
<div class="col-sm-4">
<hk-switch hk-model="was.adm.active.activeMaxEnabled"
id="active-max-switch" class="pull-right"></hk-switch>
</div>
</div>
</fieldset>

<fieldset>
<legend>Expired Sessions</legend>
<div class="form-group">
<label class="col-sm-3 control-label" for="expired-threshold">Sessions Exceeding</label>

<div class="col-sm-5">
<div class="input-group hk-input-small">
<input type="number" min="0" max="10000" ng-model="was.adm.expired.expiredThreshold"
class="form-control" id="expired-threshold" ng-disabled="!was.adm.expired.expiredEnabled">

</div>
</div>
<div class="col-sm-4">
<hk-switch hk-model="was.adm.expired.expiredEnabled"
id="expired-threshold-switch" class="pull-right"></hk-switch>
</div>
</div>
</fieldset>

<fieldset>
<legend>Rejected Sessions</legend>
<div class="form-group">
<label class="col-sm-3 control-label" for="rejected-threshold">Sessions Exceeding</label>

<div class="col-sm-5">
<div class="input-group hk-input-small">
<input type="number" min="0" max="10000" ng-model="was.adm.rejected.rejectedThreshold"
class="form-control" id="rejected-threshold" ng-disabled="!was.adm.rejected.rejectedEnabled">

</div>
</div>
<div class="col-sm-4">
<hk-switch hk-model="was.adm.rejected.rejectedEnabled"
id="rejected-threshold-switch" class="pull-right"></hk-switch>
</div>
</div>
</fieldset>

<hk-fieldset-dampening hk-duration="was.adm.active.responseDuration"
hk-disabled="!was.adm.active.activeMinEnabled &&
!was.adm.active.activeMaxEnabled &&
!was.adm.expired.expiredEnabled &&
!was.adm.rejected.rejectedEnabled">
</hk-fieldset-dampening>

<hk-fieldset-notification hk-alert-email="was.adm.active.email"
hk-disabled="!was.adm.active.activeMinEnabled &&
!was.adm.active.activeMaxEnabled &&
!was.adm.expired.expiredEnabled &&
!was.adm.rejected.rejectedEnabled">
</hk-fieldset-notification>
</form>
</div>
</tab>
</tabset>


</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-click="was.cancel()">Cancel</button>
<button type="button" class="btn btn-primary" ng-click="was.save()"
ng-disabled="was.saveProgress || !was.isSettingChange">
<div ng-show="was.saveProgress" class="spinner spinner-xs hk-modal-spinner"></div>
Save
</button>
</div>

0 comments on commit 09911c9

Please sign in to comment.