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

Commit

Permalink
Alerts: adapting JVM alerts to use SOA directives
Browse files Browse the repository at this point in the history
  • Loading branch information
Viliam Rockai committed Aug 13, 2015
1 parent 6637ac6 commit 10e914c
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 208 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
<div class="radio">
<label for="every-time-heap">
<input type="radio" name="alert-heap" id="every-time-heap" ng-value="false" ng-model="durationEnabled"
ng-click="durationToggle()" checked="" ng-disabled="!hkSwitch">
ng-click="durationToggle()" checked="" ng-disabled="hkDisabled || (hkSwitchEnabled && !hkSwitch)">
{{hkTitleMet || 'Every time conditions are met.'}}
</label>
</div>
<div class="radio">
<label for="greater-time-heap">
<input type="radio" name="alert-heap" id="greater-time-heap" ng-value="true" ng-model="durationEnabled"
ng-click="durationToggle()" ng-disabled="!hkSwitch">
ng-click="durationToggle()" ng-disabled="hkDisabled || (hkSwitchEnabled && !hkSwitch)">
{{hkTitleUnmet || 'Only when conditions are met for greater than:'}}
</label>
</div>
<hk-time-input hk-duration="hkDuration"
hk-disabled="!durationEnabled || !hkSwitch"
hk-disabled="hkDisabled || !durationEnabled || (hkSwitchEnabled && !hkSwitch)"
hk-change="durationChange()"
id="dw-duration"></hk-time-input>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="form-group">
<label class="col-sm-3 control-label" for="email-heap">Email</label>
<div class="col-sm-6">
<input type="text" id="email-heap" class="form-control" ng-model="hkAlertEmail">
<input type="text" id="email-heap" class="form-control" ng-model="hkAlertEmail" ng-disabled="hkDisabled">
</div>
</div>
</fieldset>
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ module Alert {
public link: (scope: any, element: ng.IAugmentedJQuery, attrs: ng.IAttributes) => void;
public replace = 'true';
public scope = {
hkAlertEmail: '='
hkAlertEmail: '=',
hkDisabled: '='
};
public templateUrl = 'plugins/directives/alert/html/fieldset-notification.html';

Expand Down Expand Up @@ -225,6 +226,7 @@ module Alert {
public scope = {
hkDuration: '=',
hkSwitch: '=',
hkDisabled: '=',
hkTitle: '@'
};
public templateUrl = 'plugins/directives/alert/html/fieldset-dampening.html';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,20 @@ <h4 class="modal-title">JVM Alert Settings</h4>
</div>
</div>
</fieldset>
<hk-fieldset-dampening hk-duration="jas.adm.heap.responseDuration"></hk-fieldset-dampening>
<hk-fieldset-dampening hk-duration="jas.adm.heap.responseDuration"
hk-disabled="!jas.adm.heap.conditionLtEnabled && !jas.adm.heap.conditionGtEnabled">
</hk-fieldset-dampening>

<hk-fieldset-notification hk-alert-email="jas.adm.heap.email"></hk-fieldset-notification>
<hk-fieldset-notification hk-alert-email="jas.adm.heap.email"
hk-disabled="!jas.adm.heap.conditionLtEnabled && !jas.adm.heap.conditionGtEnabled">
</hk-fieldset-notification>
</form>
</div>
</tab>
<tab heading="Non-Heap Usage">
<div id="hk-heap" class="hk-tab-content">
<p>Configure conditions settings for Non-Heap usage alerts and notifications.</p>

<form class="form-horizontal">
<fieldset>
<legend>Threshold Conditions</legend>
Expand All @@ -77,8 +81,7 @@ <h4 class="modal-title">JVM Alert Settings</h4>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="usage-greater">Usage greater than
{{jas.adm.nheap.conditionGtPercent}}</label>
<label class="col-sm-3 control-label" for="usage-greater">Usage greater than</label>

<div class="col-sm-5">
<div class="input-group hk-input-small">
Expand All @@ -96,8 +99,7 @@ <h4 class="modal-title">JVM Alert Settings</h4>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="usage-less">Usage less than
{{jas.adm.nheap.conditionLtPercent}}</label>
<label class="col-sm-3 control-label" for="usage-less">Usage less than</label>

<div class="col-sm-5">
<div class="input-group hk-input-small">
Expand All @@ -115,9 +117,13 @@ <h4 class="modal-title">JVM Alert Settings</h4>
</div>
</div>
</fieldset>
<hk-fieldset-dampening hk-duration="jas.adm.nheap.responseDuration"></hk-fieldset-dampening>
<hk-fieldset-dampening hk-duration="jas.adm.nheap.responseDuration"
hk-disabled="!jas.adm.nheap.conditionLtEnabled && !jas.adm.nheap.conditionGtEnabled">
</hk-fieldset-dampening>

<hk-fieldset-notification hk-alert-email="jas.adm.nheap.email"></hk-fieldset-notification>
<hk-fieldset-notification hk-alert-email="jas.adm.nheap.email"
hk-disabled="!jas.adm.nheap.conditionLtEnabled && !jas.adm.nheap.conditionGtEnabled">
</hk-fieldset-notification>
</form>
</div>
</tab>
Expand All @@ -129,8 +135,7 @@ <h4 class="modal-title">JVM Alert Settings</h4>
<fieldset>
<legend>Duration (major)</legend>
<div class="form-group">
<label class="col-sm-3 control-label" for="usage-greater">Greater than
{{jas.adm.garba.conditionThreshold}}</label>
<label class="col-sm-3 control-label" for="usage-greater">Greater than</label>

<div class="col-sm-5">
<div class="input-group hk-input-small">
Expand All @@ -146,9 +151,11 @@ <h4 class="modal-title">JVM Alert Settings</h4>
</div>
</div>
</fieldset>
<hk-fieldset-dampening hk-duration="jas.adm.garba.responseDuration"></hk-fieldset-dampening>
<hk-fieldset-dampening hk-duration="jas.adm.garba.responseDuration"
hk-disabled="!jas.adm.garba.conditionEnabled"></hk-fieldset-dampening>

<hk-fieldset-notification hk-alert-email="jas.adm.garba.email"></hk-fieldset-notification>
<hk-fieldset-notification hk-alert-email="jas.adm.garba.email"
hk-disabled="!jas.adm.garba.conditionEnabled"></hk-fieldset-notification>
</form>
</div>
</tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ <h4 class="modal-title">Availability Alert Settings</h4>
hk-title-met="Everytime the URL is down."
hk-title-unmet="Only when the URL is down for more than:"></hk-fieldset-dampening>

<hk-fieldset-notification hk-alert-email="mas.adm.avail.email"></hk-fieldset-notification>
<hk-fieldset-notification hk-alert-email="mas.adm.avail.email"
hk-disabled="!mas.adm.avail.conditionEnabled"></hk-fieldset-notification>
</form>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h4 class="modal-title">Response Time Alert Settings</h4>
<fieldset>
<legend>Response Time</legend>
<div class="form-group">
<label class="col-sm-3 control-label" for="dw-duration">Time (maximum)</label>
<label class="col-sm-3 control-label" for="dw-duration">Time (maximum, {{mas.adm.thres.conditionThreshold}})</label>
<div class="col-sm-5 inline-row">
<hk-time-input hk-duration="mas.adm.thres.conditionThreshold"
hk-disabled="!mas.adm.thres.conditionEnabled"
Expand All @@ -26,9 +26,11 @@ <h4 class="modal-title">Response Time Alert Settings</h4>
</div>
</fieldset>

<hk-fieldset-dampening hk-duration="mas.adm.thres.responseDuration"></hk-fieldset-dampening>
<hk-fieldset-dampening hk-duration="mas.adm.thres.responseDuration"
hk-disabled="!mas.adm.thres.conditionEnabled"></hk-fieldset-dampening>

<hk-fieldset-notification hk-alert-email="mas.adm.thres.email"></hk-fieldset-notification>
<hk-fieldset-notification hk-alert-email="mas.adm.thres.email"
hk-disabled="!mas.adm.thres.conditionEnabled"></hk-fieldset-notification>
</form>
</div>
</div>
Expand Down

0 comments on commit 10e914c

Please sign in to comment.