56 lines
1.7 KiB
HTML
56 lines
1.7 KiB
HTML
|
<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>
|
||
|
<label class="checkbox is-regex"><input type="checkbox" ng-model="m.isRegex"> /re/</label>
|
||
|
</column>
|
||
|
|
||
|
<column>
|
||
|
<div class="btn-group">
|
||
|
<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>
|
||
|
<input ng-model="silence.createdBy" type="email">
|
||
|
</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">
|
||
|
<button type="primary" ng-disabled="silence.matchers.length == 0" ng-click="create()" small>Create</button>
|
||
|
<button type="seconday" ng-click="reset()" small>Reset</button>
|
||
|
</div>
|
||
|
</form>
|