<!-- made by Miguel Rodrigues @ KBZ miguel.rodrigues@knowledgebiz.pt -->
<h1>Application Rules for {{appId}}</h1>
<table class="table">
<thead>
<tr>
<th>RulesID</th>
<th>Description</th>
<th>Parameter</th>
<th>Condition Value</th>
<th>Control Value</th>
<th>NotificationType</th>
<th>Statistics</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="rule in rules">
<td>{{rule.rulesID}}</td>
<td>{{rule.description}}</td>
<td>{{rule.parameter}}</td>
<td>{{rule.conditionValue}}</td>
<td>{{rule.controlValue}}</td>
<td>{{rule.notificationType}}</td>
<td>• Total Received Notifications: {{rule.totalNotifications}}<br>• Total of Notifications Applied by Rules: {{rule.totalNotificationsApplyByRules}}<br>• Average Value: {{rule.averageValue}}<br>• Percentage of Notifications Applied by Rules: {{rule.percentageNotificationsApplyByRules}} %</td>
<td> <a ng-click="redirect(rule.rulesID)">DELETE</a></td>
</tr>
</tbody>
</table>
<!-- APP RULES REGISTRATION FORM -->
<div class="container-fluid">
<form name="myForm">
<section class="container">
<div class="container-page">
<div class="col-md-6">
<div class="form-group col-lg-12">
<label>Description</label>
<input class="form-control" name="description" ng-model="description" required>
<span class="error" ng-show="myForm.description.$error.required"><font color="red">Required!</font></span>
</div>
<div class="form-group col-lg-12">
<label>Parameter</label>
<input class="form-control" name="parameter" ng-model="parameter" required>
<span class="error" ng-show="myForm.parameter.$error.required"><font color="red">Required!</font></span>
</div>
<div class="form-group col-lg-12">
<div class="form-group">
<label>Condition Value List:</label>
<select class="form-control" ng-model="conditionValue">
<option value="<">Less</option>
<option value="<=">Less or Equal</option>
<option value=">">Bigger</option>
<option value=">=">Bigger or Equal</option>
</select>
</div>
</div>
<div class="form-group col-lg-12">
<label>Control Value</label>
<input class="form-control" name="controlValue" ng-model="controlValue" required>
<span class="error" ng-show="myForm.controlValue.$error.required"><font color="red">Required!</font></span>
</div>
<div class="form-group col-lg-12">
<div class="form-group">
<label>Notification Type list:</label>
<select class="form-control" ng-model="notificationType">
<option value="1">End of Month</option>
<option value="2">End of Two Weeks</option>
<option value="3">End of Week</option>
<option value="4">End of Three Days</option>
<option value="5">Urgent (Immediately)</option>
</select>
</div>
</div>
</div>
</section>
</form>
<center>
<button class="btn btn-primary" type="button" value="Send" ng-click="postdata(description, parameter, conditionValue, controlValue, notificationType)">Register Rules</button>
</center>
</div>
<h3>INFORMATION:</h3>
{{msg}}