From a9c0f66cdae29d64595d6a230713ae2ba54816ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 5 Dec 2016 11:04:05 +0100 Subject: [PATCH] fix(influxdb): Fix for Ad-Hoc Filters variable & changing dashboards, fixes #6821 --- CHANGELOG.md | 1 + public/app/features/dashboard/unsavedChangesSrv.js | 1 + public/app/features/templating/templateSrv.js | 1 + 3 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f437fbab99..fc0d683cfa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ * **Singlestat**: Support repeated template variables in prefix/postfix [#6595](https://github.com/grafana/grafana/issues/6595) * **Templating**: Don't persist variable options with refresh option [#6586](https://github.com/grafana/grafana/issues/6586) * **Alerting**: Add ability to have OR conditions (and mixing AND & OR) [#6579](https://github.com/grafana/grafana/issues/6579) +* **InfluxDB**: Fix for Ad-Hoc Filters variable & changing dashboards [#6821](https://github.com/grafana/grafana/issues/6821) # 4.0-beta1 (2016-11-09) diff --git a/public/app/features/dashboard/unsavedChangesSrv.js b/public/app/features/dashboard/unsavedChangesSrv.js index 841aa4d1ddd..5ce3661100b 100644 --- a/public/app/features/dashboard/unsavedChangesSrv.js +++ b/public/app/features/dashboard/unsavedChangesSrv.js @@ -110,6 +110,7 @@ function(angular, _) { _.each(dash.templating.list, function(value) { value.current = null; value.options = null; + value.filters = null; }); }; diff --git a/public/app/features/templating/templateSrv.js b/public/app/features/templating/templateSrv.js index e4627ac6165..f2aa317351c 100644 --- a/public/app/features/templating/templateSrv.js +++ b/public/app/features/templating/templateSrv.js @@ -25,6 +25,7 @@ function (angular, _, kbn) { this.updateTemplateData = function() { this._index = {}; this._filters = {}; + this._adhocVariables = {}; for (var i = 0; i < this.variables.length; i++) { var variable = this.variables[i];