From 935f43ae1b9e006a59efa9c21daca0ebc5fb0a48 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Sun, 27 Mar 2016 19:13:01 +0300 Subject: [PATCH] Fixed metric editor in triggers panel. --- src/datasource-zabbix/queryProcessor.service.js | 4 ++++ src/panel-triggers/editor.js | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/datasource-zabbix/queryProcessor.service.js b/src/datasource-zabbix/queryProcessor.service.js index 392d2e2..49ab271 100644 --- a/src/datasource-zabbix/queryProcessor.service.js +++ b/src/datasource-zabbix/queryProcessor.service.js @@ -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 diff --git a/src/panel-triggers/editor.js b/src/panel-triggers/editor.js index 8274570..186307e 100644 --- a/src/panel-triggers/editor.js +++ b/src/panel-triggers/editor.js @@ -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; });