Ver Fonte

fix(query editor): Fixed issue with removing query for data sources without collapsable query editors, fixes #4856

Torkel Ödegaard há 9 anos atrás
pai
commit
70d03b7a1c
3 ficheiros alterados com 7 adições e 3 exclusões
  1. 2 1
      CHANGELOG.md
  2. 1 1
      package.json
  3. 4 1
      public/app/features/panel/query_editor_row.ts

+ 2 - 1
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)
 

+ 1 - 1
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"

+ 4 - 1
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();
   }