Add all value regex to host dropdown.
This commit is contained in:
8
dist/datasource-zabbix/query.controller.js
vendored
8
dist/datasource-zabbix/query.controller.js
vendored
@@ -91,7 +91,7 @@ System.register(['app/plugins/sdk', 'angular', 'lodash', './utils', './metricFun
|
||||
|
||||
// Map functions for bs-typeahead
|
||||
_this.getGroupNames = _.bind(_this.getMetricNames, _this, 'groupList');
|
||||
_this.getHostNames = _.bind(_this.getMetricNames, _this, 'hostList');
|
||||
_this.getHostNames = _.bind(_this.getMetricNames, _this, 'hostList', true);
|
||||
_this.getApplicationNames = _.bind(_this.getMetricNames, _this, 'appList');
|
||||
_this.getItemNames = _.bind(_this.getMetricNames, _this, 'itemList');
|
||||
|
||||
@@ -161,7 +161,7 @@ System.register(['app/plugins/sdk', 'angular', 'lodash', './utils', './metricFun
|
||||
}
|
||||
}, {
|
||||
key: 'getMetricNames',
|
||||
value: function getMetricNames(metricList) {
|
||||
value: function getMetricNames(metricList, addAllValue) {
|
||||
var metrics = _.uniq(_.map(this.metric[metricList], 'name'));
|
||||
|
||||
// Add template variables
|
||||
@@ -169,6 +169,10 @@ System.register(['app/plugins/sdk', 'angular', 'lodash', './utils', './metricFun
|
||||
metrics.unshift('$' + variable.name);
|
||||
});
|
||||
|
||||
if (addAllValue) {
|
||||
metrics.unshift('/.*/');
|
||||
}
|
||||
|
||||
return metrics;
|
||||
}
|
||||
}, {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user