From 12a3a2b6b06c276fed75b9eb95ab890dbc7c2b26 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Thu, 6 Aug 2015 22:36:14 +0300 Subject: [PATCH 1/4] Modify annotations editor. --- zabbix/partials/annotations.editor.html | 37 +++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/zabbix/partials/annotations.editor.html b/zabbix/partials/annotations.editor.html index 1e9caba..2b98557 100644 --- a/zabbix/partials/annotations.editor.html +++ b/zabbix/partials/annotations.editor.html @@ -4,9 +4,42 @@ Example: Lack of free swap space
- Name + +
+ +
+
From ad83ecfe69a71d11b016e96c13fbc03f90d7f78a Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Sat, 15 Aug 2015 22:32:14 +0300 Subject: [PATCH 2/4] 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
- -
+ +
+
+ + +
+
+ + +
+
+ +