diff --git a/zabbix/datasource.js b/zabbix/datasource.js index ec0798a..a036043 100644 --- a/zabbix/datasource.js +++ b/zabbix/datasource.js @@ -301,11 +301,17 @@ function (angular, _, kbn) { var params = { output: ['triggerid', 'description'], search: { - 'description': annotation.query + 'description': annotation.trigger }, searchWildcardsEnabled: 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) .then(function (result) { diff --git a/zabbix/partials/annotations.editor.html b/zabbix/partials/annotations.editor.html index 2b98557..eef6f78 100644 --- a/zabbix/partials/annotations.editor.html +++ b/zabbix/partials/annotations.editor.html @@ -1,37 +1,31 @@
Zabbix trigger - Example: Lack of free swap space
- -