Merge branch 'feature-improve_annotations' into develop

This commit is contained in:
Alexander Zobnin
2015-08-16 15:10:12 +03:00
2 changed files with 25 additions and 7 deletions

View File

@@ -309,11 +309,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 = templateSrv.replace(annotation.host);
}
else if (annotation.group) {
params.group = templateSrv.replace(annotation.group);
}
return this.zabbixAPI.performZabbixAPIRequest('trigger.get', params) return this.zabbixAPI.performZabbixAPIRequest('trigger.get', params)
.then(function (result) { .then(function (result) {

View File

@@ -1,14 +1,26 @@
<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">
<input type="text" class="span10"
ng-model="currentAnnotation.query"
placeholder="Lack of free swap space">
</div> </div>
</div> </div>
<div class="editor-row">
<div class="editor-option">
<label class="small">Group</label>
<input type="text" class="input-medium" ng-model='currentAnnotation.group'></input>
</div>
<div class="editor-option">
<label class="small">Host</label>
<input type="text" class="input-medium" ng-model='currentAnnotation.host'></input>
</div>
<div class="editor-option">
<label class="small">Trigger
<tip>Trigger name for search. Wildcards are supports. Examples: Lack of free swap space, Lack of*.
</tip>
</label>
<input type="text" style="width: 25em" ng-model='currentAnnotation.trigger' placeholder="Trigger name"></input>
</div>
</div> </div>
<div class="editor-row"> <div class="editor-row">