2015-10-12 20:22:21 +00:00
|
|
|
|
<div id="silence-create" ng-controller="SilenceCreateCtrl">
|
2015-10-13 14:59:37 +00:00
|
|
|
|
<form novalidate>
|
2015-10-12 20:22:21 +00:00
|
|
|
|
Start: <input ng-model="silence.startsAt" type="datetime-local">
|
|
|
|
|
End: <input ng-model="silence.endsAt" type="datetime-local">
|
|
|
|
|
|
2015-10-13 14:59:37 +00:00
|
|
|
|
<div ng-repeat="m in silence.matchers">
|
|
|
|
|
<input placeholder="name" ng-model="m.name">
|
|
|
|
|
<input placeholder="value" ng-model="m.value">
|
|
|
|
|
regex: <input type="checkbox" ng-model="m.isRegex">
|
|
|
|
|
<button ng-hide="$first" ng-click="delMatcher($index)">-</button>
|
|
|
|
|
<button ng-show="$last" ng-click="newMatcher()">+</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div ng-show="error != null">Error: {{ error }}</div>
|
2015-10-12 20:22:21 +00:00
|
|
|
|
|
|
|
|
|
<button ng-click="create()">Create</button>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
2015-10-12 15:08:07 +00:00
|
|
|
|
|
2015-10-12 20:22:21 +00:00
|
|
|
|
<div id="silences-query">
|
2015-10-12 20:24:18 +00:00
|
|
|
|
<input placeholder="search" ng-model="query">
|
|
|
|
|
|
|
|
|
|
order by:
|
2015-10-12 20:22:21 +00:00
|
|
|
|
<select ng-model="order">
|
2015-10-12 20:24:18 +00:00
|
|
|
|
<option value="startsAt">start</option>
|
|
|
|
|
<option value="endsAt">end</option>
|
|
|
|
|
<option value="createdAt">created</option>
|
2015-10-12 20:22:21 +00:00
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div ng-show="silences.length == 0">No silences configured</div>
|
|
|
|
|
<div ng-hide="silences.length == 0" id="silences-list">
|
|
|
|
|
<div ng-repeat="sil in silences | filter:query | orderBy:order">
|
2015-10-12 20:24:18 +00:00
|
|
|
|
{{ sil.startsAt | date:'medium' }} – {{ sil.endsAt | date:'medium' }}
|
|
|
|
|
created: {{ sil.createdAt | date:'medium' }}
|
2015-10-12 20:22:21 +00:00
|
|
|
|
<div ng-repeat="m in sil.matchers | orderBy:name">
|
|
|
|
|
{{ m.name }} = {{ m.value }} <span ng-show="m.isRegex">[re]</span>
|
|
|
|
|
</div>
|
|
|
|
|
<button ng-click="delete(sil)">Delete</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|