From 70d03b7a1c40da4f34047d39e8f183f7f5dbf41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 29 Apr 2016 23:20:24 +0200 Subject: [PATCH] fix(query editor): Fixed issue with removing query for data sources without collapsable query editors, fixes #4856 --- CHANGELOG.md | 3 ++- package.json | 2 +- public/app/features/panel/query_editor_row.ts | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45ab19e8581..874386a2c33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ### Bug fixes * **Dashboard title**: Fixed max dashboard title width (media query) for large screens, fixes [#4859](https://github.com/grafana/grafana/issues/4859) -* **Annotations**: Fixed issue with entering annotation edit view, fixes [#4857](https://github.com/grafana/grafana/issues/4857) +* **Annotations**: Fixed issue with entering annotation edit view, fixes [#4857](https://github.com/grafana/grafana/issues/4857) +* **Remove query**: Fixed issue with removing query for data sources without collapsable query editors, fixes [#4856](https://github.com/grafana/grafana/issues/4856) # 3.0.0-beta6 (2016-04-29) diff --git a/package.json b/package.json index e314476f999..5c2b8471626 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "company": "Coding Instinct AB" }, "name": "grafana", - "version": "3.0.0-beta6", + "version": "3.0.0-beta7", "repository": { "type": "git", "url": "http://github.com/grafana/grafana.git" diff --git a/public/app/features/panel/query_editor_row.ts b/public/app/features/panel/query_editor_row.ts index 84cc597e388..76bdd6d8539 100644 --- a/public/app/features/panel/query_editor_row.ts +++ b/public/app/features/panel/query_editor_row.ts @@ -79,7 +79,10 @@ export class QueryRowCtrl { } removeQuery() { - delete this.panelCtrl.__collapsedQueryCache[this.target.refId]; + if (this.panelCtrl.__collapsedQueryCache) { + delete this.panelCtrl.__collapsedQueryCache[this.target.refId]; + } + this.panel.targets = _.without(this.panel.targets, this.target); this.panelCtrl.refresh(); }