Fixed metric editor in triggers panel.
This commit is contained in:
@@ -71,6 +71,10 @@ angular.module('grafana.services').factory('QueryProcessor', function($q) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getGroups() {
|
||||||
|
return this.cache.getGroups();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get list of host belonging to given groups.
|
* Get list of host belonging to given groups.
|
||||||
* @return list of hosts
|
* @return list of hosts
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class TriggerPanelEditorCtrl{
|
|||||||
|
|
||||||
filterGroups() {
|
filterGroups() {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.datasource.queryProcessor.filterGroups().then(function(groups) {
|
this.datasource.queryProcessor.getGroups().then(function(groups) {
|
||||||
self.metric.groupList = groups;
|
self.metric.groupList = groups;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,7 @@ class TriggerPanelEditorCtrl{
|
|||||||
filterHosts() {
|
filterHosts() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var groupFilter = this.templateSrv.replace(this.panel.triggers.group.filter);
|
var groupFilter = this.templateSrv.replace(this.panel.triggers.group.filter);
|
||||||
this.datasource.queryProcessor.filterHosts(groupFilter).then(function(hosts) {
|
this.datasource.queryProcessor.getHosts(groupFilter).then(function(hosts) {
|
||||||
self.metric.filteredHosts = hosts;
|
self.metric.filteredHosts = hosts;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -102,7 +102,7 @@ class TriggerPanelEditorCtrl{
|
|||||||
var self = this;
|
var self = this;
|
||||||
var groupFilter = this.templateSrv.replace(this.panel.triggers.group.filter);
|
var groupFilter = this.templateSrv.replace(this.panel.triggers.group.filter);
|
||||||
var hostFilter = this.templateSrv.replace(this.panel.triggers.host.filter);
|
var hostFilter = this.templateSrv.replace(this.panel.triggers.host.filter);
|
||||||
this.datasource.queryProcessor.filterApplications(groupFilter, hostFilter)
|
this.datasource.queryProcessor.getApps(groupFilter, hostFilter)
|
||||||
.then(function(apps) {
|
.then(function(apps) {
|
||||||
self.metric.filteredApplications = apps;
|
self.metric.filteredApplications = apps;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user