From 560d476102156ee59d0ffd1274701bf99abd62b7 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Fri, 24 Jul 2015 20:51:44 +0300 Subject: [PATCH 01/19] Refactoring - resolve some code inspection problems for JSDoc. --- zabbix/zabbixAPIWrapper.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/zabbix/zabbixAPIWrapper.js b/zabbix/zabbixAPIWrapper.js index 0399915..3954b36 100644 --- a/zabbix/zabbixAPIWrapper.js +++ b/zabbix/zabbixAPIWrapper.js @@ -245,8 +245,8 @@ function (angular, _) { /** * Get the list of hosts * - * @param {array} groupids - * @return {array} array of Zabbix host objects + * @param {string|string[]} groupids + * @return {Object} array of Zabbix host objects */ p.performHostSuggestQuery = function(groupids) { var params = { @@ -269,7 +269,7 @@ function (angular, _) { * * @param {array} hostids * @param {array} groupids - * @return {array} array of Zabbix application objects + * @return {Object} array of Zabbix application objects */ p.performAppSuggestQuery = function(hostids, /* optional */ groupids) { var params = { @@ -289,10 +289,10 @@ function (angular, _) { /** * Items request * - * @param {string or Array} hostids /////////////////////////// - * @param {string or Array} applicationids // Zabbix API parameters // - * @param {string or Array} groupids /////////////////////////// - * @return {string or Array} Array of Zabbix API item objects + * @param {string|string[]} hostids /////////////////////////// + * @param {string|string[]} applicationids // Zabbix API parameters // + * @param {string|string[]} groupids /////////////////////////// + * @return {string|string[]} Array of Zabbix API item objects */ p.performItemSuggestQuery = function(hostids, applicationids, /* optional */ groupids) { var params = { From e6c5dd35bf71d988501d4af956cab42b28efed9e Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Fri, 24 Jul 2015 20:53:50 +0300 Subject: [PATCH 02/19] iss #19 - implements getITService() and getSLA() methods. --- zabbix/zabbixAPIWrapper.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/zabbix/zabbixAPIWrapper.js b/zabbix/zabbixAPIWrapper.js index 3954b36..c0b8980 100644 --- a/zabbix/zabbixAPIWrapper.js +++ b/zabbix/zabbixAPIWrapper.js @@ -508,6 +508,25 @@ function (angular, _) { }); }; + p.getITService = function(/* optional */ serviceids) { + var params = { + output: 'extend', + serviceids: serviceids + }; + return this.performZabbixAPIRequest('service.get', params); + }; + + p.getSLA = function(serviceids, from, to) { + var params = { + serviceids: serviceids, + intervals: [{ + from: from, + to: to + }] + }; + return this.performZabbixAPIRequest('service.getsla', params); + }; + return ZabbixAPI; }); From f5cd2a0830f36e1c0a72b23207bf624bbaf2c0f2 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Fri, 24 Jul 2015 23:28:24 +0300 Subject: [PATCH 03/19] Fixed layout in query editor. --- zabbix/partials/query.editor.html | 67 ++++++++++++++----------------- 1 file changed, 31 insertions(+), 36 deletions(-) diff --git a/zabbix/partials/query.editor.html b/zabbix/partials/query.editor.html index 30b767b..4fccecb 100644 --- a/zabbix/partials/query.editor.html +++ b/zabbix/partials/query.editor.html @@ -55,15 +55,13 @@
  • Group
  • - + @@ -73,15 +71,13 @@
  • Host
  • - + @@ -105,7 +101,9 @@
    + +
    From add7ed0f0f6be99d3ed49df0301c4f6466966e3e Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Fri, 24 Jul 2015 23:50:24 +0300 Subject: [PATCH 04/19] iss #19 - Implemented base behavior for switching editor to IT Services. --- zabbix/partials/query.editor.html | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/zabbix/partials/query.editor.html b/zabbix/partials/query.editor.html index 4fccecb..fe8a516 100644 --- a/zabbix/partials/query.editor.html +++ b/zabbix/partials/query.editor.html @@ -16,6 +16,15 @@ -