PR for request #562
https://github.com/alexanderzobnin/grafana-zabbix/issues/562
This commit is contained in:
24
dist/datasource-zabbix/zabbix.js
vendored
24
dist/datasource-zabbix/zabbix.js
vendored
@@ -251,11 +251,11 @@ System.register(['angular', 'lodash', './utils', './zabbixAPI.service.js', './za
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Find group, host, app or item by given name.
|
||||
* @param list list of groups, apps or other
|
||||
* @param name visible name
|
||||
* @return array with finded element or empty array
|
||||
/**
|
||||
* Find group, host, app or item by given name.
|
||||
* @param list list of groups, apps or other
|
||||
* @param name visible name
|
||||
* @return array with finded element or empty array
|
||||
*/
|
||||
function findByName(list, name) {
|
||||
var finded = _.find(list, { 'name': name });
|
||||
@@ -266,13 +266,13 @@ System.register(['angular', 'lodash', './utils', './zabbixAPI.service.js', './za
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Different hosts can contains applications and items with same name.
|
||||
* For this reason use _.filter, which return all elements instead _.find,
|
||||
* which return only first finded.
|
||||
* @param {[type]} list list of elements
|
||||
* @param {[type]} name app name
|
||||
* @return {[type]} array with finded element or empty array
|
||||
/**
|
||||
* Different hosts can contains applications and items with same name.
|
||||
* For this reason use _.filter, which return all elements instead _.find,
|
||||
* which return only first finded.
|
||||
* @param {[type]} list list of elements
|
||||
* @param {[type]} name app name
|
||||
* @return {[type]} array with finded element or empty array
|
||||
*/
|
||||
function filterByName(list, name) {
|
||||
var finded = _.filter(list, { 'name': name });
|
||||
|
||||
Reference in New Issue
Block a user