PR for request #562
https://github.com/alexanderzobnin/grafana-zabbix/issues/562
This commit is contained in:
36
dist/datasource-zabbix/utils.js
vendored
36
dist/datasource-zabbix/utils.js
vendored
@@ -5,12 +5,12 @@ System.register(['lodash', 'moment'], function (_export, _context) {
|
||||
|
||||
var _, moment, MACRO_PATTERN, regexPattern;
|
||||
|
||||
/**
|
||||
* Expand Zabbix item name
|
||||
*
|
||||
* @param {string} name item name, ie "CPU $2 time"
|
||||
* @param {string} key item key, ie system.cpu.util[,system,avg1]
|
||||
* @return {string} expanded name, ie "CPU system time"
|
||||
/**
|
||||
* Expand Zabbix item name
|
||||
*
|
||||
* @param {string} name item name, ie "CPU $2 time"
|
||||
* @param {string} key item key, ie system.cpu.util[,system,avg1]
|
||||
* @return {string} expanded name, ie "CPU system time"
|
||||
*/
|
||||
function expandItemName(name, key) {
|
||||
|
||||
@@ -105,10 +105,10 @@ System.register(['lodash', 'moment'], function (_export, _context) {
|
||||
return macro;
|
||||
}
|
||||
|
||||
/**
|
||||
* Split template query to parts of zabbix entities
|
||||
* group.host.app.item -> [group, host, app, item]
|
||||
* {group}{host.com} -> [group, host.com]
|
||||
/**
|
||||
* Split template query to parts of zabbix entities
|
||||
* group.host.app.item -> [group, host, app, item]
|
||||
* {group}{host.com} -> [group, host.com]
|
||||
*/
|
||||
function splitTemplateQuery(query) {
|
||||
var splitPattern = /\{[^\{\}]*\}|\{\/.*\/\}/g;
|
||||
@@ -194,11 +194,11 @@ System.register(['lodash', 'moment'], function (_export, _context) {
|
||||
return duration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format acknowledges.
|
||||
*
|
||||
* @param {array} acknowledges array of Zabbix acknowledge objects
|
||||
* @return {string} HTML-formatted table
|
||||
/**
|
||||
* Format acknowledges.
|
||||
*
|
||||
* @param {array} acknowledges array of Zabbix acknowledge objects
|
||||
* @return {string} HTML-formatted table
|
||||
*/
|
||||
|
||||
_export('parseTimeShiftInterval', parseTimeShiftInterval);
|
||||
@@ -231,9 +231,9 @@ System.register(['lodash', 'moment'], function (_export, _context) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap function to prevent multiple calls
|
||||
* when waiting for result.
|
||||
/**
|
||||
* Wrap function to prevent multiple calls
|
||||
* when waiting for result.
|
||||
*/
|
||||
|
||||
_export('convertToZabbixAPIUrl', convertToZabbixAPIUrl);
|
||||
|
||||
Reference in New Issue
Block a user