From ad83ecfe69a71d11b016e96c13fbc03f90d7f78a Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Sat, 15 Aug 2015 22:32:14 +0300 Subject: [PATCH] iss #61 - Improved annotations editor. Able to specify Group and Host for triggers search. --- zabbix/datasource.js | 8 +++++++- zabbix/partials/annotations.editor.html | 22 ++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) 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
- -