Add all value regex to host dropdown.
This commit is contained in:
@@ -68,7 +68,7 @@ var ZabbixQueryController = exports.ZabbixQueryController = function (_QueryCtrl
|
||||
|
||||
// Map functions for bs-typeahead
|
||||
_this.getGroupNames = _lodash2.default.bind(_this.getMetricNames, _this, 'groupList');
|
||||
_this.getHostNames = _lodash2.default.bind(_this.getMetricNames, _this, 'hostList');
|
||||
_this.getHostNames = _lodash2.default.bind(_this.getMetricNames, _this, 'hostList', true);
|
||||
_this.getApplicationNames = _lodash2.default.bind(_this.getMetricNames, _this, 'appList');
|
||||
_this.getItemNames = _lodash2.default.bind(_this.getMetricNames, _this, 'itemList');
|
||||
|
||||
@@ -141,7 +141,7 @@ var ZabbixQueryController = exports.ZabbixQueryController = function (_QueryCtrl
|
||||
|
||||
}, {
|
||||
key: 'getMetricNames',
|
||||
value: function getMetricNames(metricList) {
|
||||
value: function getMetricNames(metricList, addAllValue) {
|
||||
var metrics = _lodash2.default.uniq(_lodash2.default.map(this.metric[metricList], 'name'));
|
||||
|
||||
// Add template variables
|
||||
@@ -149,6 +149,10 @@ var ZabbixQueryController = exports.ZabbixQueryController = function (_QueryCtrl
|
||||
metrics.unshift('$' + variable.name);
|
||||
});
|
||||
|
||||
if (addAllValue) {
|
||||
metrics.unshift('/.*/');
|
||||
}
|
||||
|
||||
return metrics;
|
||||
}
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user