diff --git a/zabbix/datasource.js b/zabbix/datasource.js index 283295e..ff249c4 100644 --- a/zabbix/datasource.js +++ b/zabbix/datasource.js @@ -633,6 +633,11 @@ function (angular, _, kbn) { select_acknowledges: 'extend' }; + // Show problem events only + if (!annotation.showOkEvents) { + params.value = 1; + } + return self.performZabbixAPIRequest('event.get', params) .then(function (result) { var events = []; @@ -712,9 +717,15 @@ function getShortTime(date) { } +/** + * Format acknowledges. + * + * @param {array} acknowledges array of Zabbix acknowledge objects + * @return {string} HTML-formatted table + */ function formatAcknowledges(acknowledges) { if (acknowledges.length) { - var formatted_acknowledges = '

Acknowledges:
'; + var formatted_acknowledges = '

Acknowledges:
TimeUserComments
'; _.each(_.map(acknowledges, function (ack) { var time = new Date(ack.clock * 1000); return ''; diff --git a/zabbix/partials/annotations.editor.html b/zabbix/partials/annotations.editor.html index eb65f53..1ca3d78 100644 --- a/zabbix/partials/annotations.editor.html +++ b/zabbix/partials/annotations.editor.html @@ -2,7 +2,15 @@
Zabbix trigger Example: Lack of free swap space
- +
+ +
+
+
Options
+ + +
+
TimeUserComments
' + getShortTime(time) + '' + ack.alias + ' (' + ack.name+ ' ' + ack.surname + ')' + '' + ack.message + '