alertmanager/ui/app/partials/silence-form.html

54 lines
1.7 KiB
HTML
Raw Normal View History

2015-11-02 19:04:37 +00:00
<form novalidate class="forms" ng-controller="SilenceCreateCtrl">
<fieldset id="silence-create">
<legend>Create <span class="desc">Define a new silence.</span></legend>
<row>
<column>
<label>Start</label>
<input ng-model="silence.startsAt" type="datetime-local">
</column>
<column>
<label>End</label>
<input ng-model="silence.endsAt" type="datetime-local">
</column>
</row>
<label>Matchers <span class="desc">Alerts affected by this silence.</span></label>
<row class="silence-matchers" ng-repeat="m in silence.matchers">
<column cols="2">
<input class="input-small" type="text" placeholder="name" ng-model="m.name">
</column>
<column cols="2">
<input class="input-small" type="text" placeholder="value" ng-model="m.value">
</column>
<column>
<div class="btn-group">
2015-11-06 13:14:46 +00:00
<button type="primary" small><label class="checkbox is-regex"><input type="checkbox" ng-model="m.isRegex"> regex</label></button>
2015-11-02 19:04:37 +00:00
<button type="secondary" ng-hide="silence.matchers.length <= 1" ng-click="delMatcher($index)" small>-</button>
<button type="secondary" ng-click="addMatcher()" small>+</button>
</div>
</column>
</row>
<row>
<column cols="2">
<label>Creator</label>
2015-11-06 13:14:46 +00:00
<input ng-model="silence.createdBy" type="email" required>
2015-11-02 19:04:37 +00:00
</column>
<column cols="4">
<label>Comment</label>
<input ng-model="silence.comment" type="text">
</column>
</row>
</fieldset>
<div ng-show="error != null"><span class="error">{{ error }}</span></div>
<div class="btn-group">
2015-11-06 13:14:46 +00:00
<button type="primary" ng-disabled="silence.matchers.length == 0" ng-click="create()" upper>Create</button>
<button type="seconday" ng-click="reset()" upper>Reset</button>
2015-11-02 19:04:37 +00:00
</div>
</form>