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; } });