From 8934c83742a8a6cc0dc5126cc3bbcacfddb21efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 2 Jun 2015 14:39:21 +0200 Subject: [PATCH] Small fixes for template variable groups (tags) --- public/app/directives/variableValueSelect.js | 2 ++ public/app/features/dashboard/partials/variableValueSelect.html | 2 +- public/app/features/templating/templateValuesSrv.js | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/public/app/directives/variableValueSelect.js b/public/app/directives/variableValueSelect.js index c89485130aa..2ddb0dd932c 100644 --- a/public/app/directives/variableValueSelect.js +++ b/public/app/directives/variableValueSelect.js @@ -26,6 +26,8 @@ function (angular, app, _) { return option; }); + _.sortBy(vm.options, 'text'); + vm.selectedValues = _.filter(vm.options, {selected: true}); if (!vm.tags) { diff --git a/public/app/features/dashboard/partials/variableValueSelect.html b/public/app/features/dashboard/partials/variableValueSelect.html index 011522d6afe..25d220ab3a5 100644 --- a/public/app/features/dashboard/partials/variableValueSelect.html +++ b/public/app/features/dashboard/partials/variableValueSelect.html @@ -2,8 +2,8 @@ {{vm.linkText}} - {{tag.text}}     + {{tag.text}} diff --git a/public/app/features/templating/templateValuesSrv.js b/public/app/features/templating/templateValuesSrv.js index 1cfa9bfc4ad..267a465cd89 100644 --- a/public/app/features/templating/templateValuesSrv.js +++ b/public/app/features/templating/templateValuesSrv.js @@ -153,6 +153,7 @@ function (angular, _, kbn) { }); }); } else { + delete variable.tags; return queryPromise; } });