iss #61 - Improved annotations editor. Able to specify Group and Host for triggers search.
This commit is contained in:
@@ -301,11 +301,17 @@ function (angular, _, kbn) {
|
|||||||
var params = {
|
var params = {
|
||||||
output: ['triggerid', 'description'],
|
output: ['triggerid', 'description'],
|
||||||
search: {
|
search: {
|
||||||
'description': annotation.query
|
'description': annotation.trigger
|
||||||
},
|
},
|
||||||
searchWildcardsEnabled: true,
|
searchWildcardsEnabled: true,
|
||||||
expandDescription: true
|
expandDescription: true
|
||||||
};
|
};
|
||||||
|
if (annotation.host) {
|
||||||
|
params.host = annotation.host;
|
||||||
|
}
|
||||||
|
else if (annotation.group) {
|
||||||
|
params.group = annotation.group;
|
||||||
|
}
|
||||||
|
|
||||||
return this.zabbixAPI.performZabbixAPIRequest('trigger.get', params)
|
return this.zabbixAPI.performZabbixAPIRequest('trigger.get', params)
|
||||||
.then(function (result) {
|
.then(function (result) {
|
||||||
|
|||||||
@@ -1,37 +1,31 @@
|
|||||||
<div class="editor-row">
|
<div class="editor-row">
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h5>Zabbix trigger
|
<h5>Zabbix trigger
|
||||||
<tip>Example: Lack of free swap space</tip>
|
|
||||||
</h5>
|
</h5>
|
||||||
<div class="editor-option">
|
<div class="editor-option">
|
||||||
<label class="small">Name</label>
|
|
||||||
<input type="text" class="tight-form-input input-large"
|
|
||||||
ng-model="currentAnnotation.group"
|
|
||||||
placeholder="Lack of free swap space">
|
|
||||||
<div class="tight-form">
|
<div class="tight-form">
|
||||||
<ul class="tight-form-list" role="menu">
|
<ul class="tight-form-list" role="menu">
|
||||||
<!-- Host Group -->
|
<!-- Host Group -->
|
||||||
<li class="tight-form-item input-small" style="width: 5em">Group</li>
|
<li class="tight-form-item input-small" style="width: 4em">Group</li>
|
||||||
<li>
|
<li>
|
||||||
<input type="text" class="tight-form-input input-large"
|
<input type="text" class="tight-form-input input-medium"
|
||||||
ng-model="currentAnnotation.group"
|
ng-model="currentAnnotation.group">
|
||||||
placeholder="Lack of free swap space">
|
|
||||||
</li>
|
</li>
|
||||||
<!-- Host -->
|
<!-- Host -->
|
||||||
<li class="tight-form-item input-small" style="width: 3em">Host</li>
|
<li class="tight-form-item input-small" style="width: 3em">Host</li>
|
||||||
<li>
|
<li>
|
||||||
<input type="text" class="tight-form-input input-large"
|
<input type="text" class="tight-form-input input-medium"
|
||||||
ng-model="currentAnnotation.host"
|
ng-model="currentAnnotation.host">
|
||||||
placeholder="Lack of free swap space">
|
|
||||||
</li>
|
</li>
|
||||||
<!-- Trigger filter -->
|
<!-- Trigger filter -->
|
||||||
<li class="tight-form-item">
|
<li class="tight-form-item input-small">
|
||||||
Trigger
|
Trigger
|
||||||
<i class="fa fa-question-circle"
|
<i class="fa fa-question-circle"
|
||||||
bs-tooltip="'Filtering hosts by regex. Select All in items and specify regex for host names.'"></i>
|
bs-tooltip="'Zabbix trigger name or regex for search. Example: Lack of free swap space'"></i>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input type="text" class="tight-form-input input-large"
|
<input type="text" class="tight-form-input input-large"
|
||||||
|
style="width: 20em"
|
||||||
ng-model="currentAnnotation.trigger"
|
ng-model="currentAnnotation.trigger"
|
||||||
spellcheck='false'
|
spellcheck='false'
|
||||||
placeholder="Trigger filter (regex)"
|
placeholder="Trigger filter (regex)"
|
||||||
|
|||||||
Reference in New Issue
Block a user