Commit 81747e16 by Torkel Ödegaard

Annotations: Fix for annotations not reloaded when switching between 2…

Annotations: Fix for annotations not reloaded when switching between 2 dashboards with annotations, Fixes #851
parent 0fbace72
# 1.9.0 (unreleased) # 1.9.0 (unreleased)
# 1.8.1 (unreleased)
**Fixes** **Fixes**
- [Issue #847](https://github.com/grafana/grafana/issues/847). Graph: Fix for series draw order not being the same after hiding/unhiding series - [Issue #847](https://github.com/grafana/grafana/issues/847). Graph: Fix for series draw order not being the same after hiding/unhiding series
- [Issue #851](https://github.com/grafana/grafana/issues/851). Annotations: Fix for annotations not reloaded when switching between 2 dashboards with annotations
# 1.8.0 (2014-09-22) # 1.8.0 (2014-09-22)
......
...@@ -13,7 +13,8 @@ define([ ...@@ -13,7 +13,8 @@ define([
var timezone; var timezone;
this.init = function() { this.init = function() {
$rootScope.$on('refresh', this.clearCache); $rootScope.onAppEvent('refresh', this.clearCache);
$rootScope.onAppEvent('setup-dashboard', this.clearCache);
}; };
this.clearCache = function() { this.clearCache = function() {
......
...@@ -94,6 +94,10 @@ function (angular, _, config, kbn, moment) { ...@@ -94,6 +94,10 @@ function (angular, _, config, kbn, moment) {
for (var i = 0; i < fieldNames.length; i++) { for (var i = 0; i < fieldNames.length; i++) {
fieldValue = fieldValue[fieldNames[i]]; fieldValue = fieldValue[fieldNames[i]];
if (!fieldValue) {
console.log('could not find field in annotatation: ', fieldName);
return '';
}
} }
if (_.isArray(fieldValue)) { if (_.isArray(fieldValue)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment