Fixed metric editor in triggers panel.

This commit is contained in:
Alexander Zobnin
2016-03-27 19:13:01 +03:00
parent c5e8776936
commit 935f43ae1b
2 changed files with 7 additions and 3 deletions

View File

@@ -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.
* @return list of hosts

View File

@@ -85,7 +85,7 @@ class TriggerPanelEditorCtrl{
filterGroups() {
var self = this;
this.datasource.queryProcessor.filterGroups().then(function(groups) {
this.datasource.queryProcessor.getGroups().then(function(groups) {
self.metric.groupList = groups;
});
}
@@ -93,7 +93,7 @@ class TriggerPanelEditorCtrl{
filterHosts() {
var self = this;
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;
});
}
@@ -102,7 +102,7 @@ class TriggerPanelEditorCtrl{
var self = this;
var groupFilter = this.templateSrv.replace(this.panel.triggers.group.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) {
self.metric.filteredApplications = apps;
});