##// END OF EJS Templates
components: admin panel componentized
components: admin panel componentized

File last commit:

r72:3c69f25a
r85:d384ac58
Show More
report_alert_action.html
56 lines | 3.0 KiB | text/html | HtmlLexer
project: initial commit
r0 <div class="panel panel-default action">
<div class="panel-body form-inline">
<div class="pull-right">
<span class="dropdown" data-uib-dropdown>
<a class="btn btn-danger" data-uib-dropdown-toggle><span class="fa fa-trash-o"></span></a>
<ul class="dropdown-menu">
<li><a>No</a></li>
<li><a ng-click="ctrl.deleteAction(ctrl.actions, ctrl.action)">Yes</a></li>
</ul>
</span>
</div>
<div class="form-group">
<label>Applies to</label>
<select class="form-control" ng-model="ctrl.action.resource_id" ng-options="f.resource_id as f.resource_name for f in ctrl.applications" ng-change="ctrl.setDirty()">
<option value="">All Resources</option>
</select>
</div>
<div class="form-group">
<label>Notify</label>
<select class="form-control" ng-model="ctrl.action.action" ng-change="ctrl.setDirty()" ng-options="f[0] as f[1] for f in ctrl.possibleNotifications"></select>
<a class="btn btn-success" ng-if="ctrl.action.dirty" ng-click="ctrl.saveAction()"><span class="fa fa-save"></span> &nbsp;Save changes</a>
</div>
<div>
<p><strong>Channels:</strong></p>
<ul class="list-group">
<li class="list-group-item" ng-repeat="channel in ctrl.action.channels">
<strong>{{channel.channel_visible_value}}</strong>
<div class="pull-right">
<span class="dropdown" data-uib-dropdown>
<a class="btn btn-danger btn-xs" data-uib-dropdown-toggle><span class="fa fa-trash-o"></span></a>
<ul class="dropdown-menu">
<li><a>No</a></li>
<li><a ng-click="ctrl.unBindChannel(channel)">Yes</a></li>
</ul>
</span>
</div>
</li>
</ul>
<div class="form-group" ng-if="ctrl.possibleChannels.length">
<select class="form-control" ng-model="ctrl.channelToBind" ng-options="c as c.channel_visible_value for c in ctrl.possibleChannels |filter: c.supports_report_alerting"></select>
<a class="btn btn-info" ng-click="ctrl.bindChannel(channel, ctrl.action)"><span class="fa fa-plus-circle"></span> Add Channel</a>
</div>
<div class="alert alert-danger" ng-if="!ctrl.possibleChannels.length">
<span class="fa fa-exclamation-triangle "></span>You need to create an alert channel before you can assign it to your rule.
</div>
</div>
<hr/>
<p>Meeting following criteria:</p>
<form-errors errors="ctrl.errors"></form-errors>
<rule rule="ctrl.action.rule" rule-definitions="ctrl.ruleDefinitions" parent-rule="null" parent-obj="ctrl.action"></rule>
</div>
</div>