From 39a6bf978431a9560bc4bb8659cf1df45bfa4c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 10 Feb 2015 19:38:55 +0100 Subject: [PATCH 1/2] Updated readme with info about the Grafana 2.0 develop branch --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 98f47aa6357..dc9ed582fda 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,12 @@ Graphite, InfluxDB & OpenTSDB. ![](http://grafana.org/assets/img/start_page_bg.png) +## Grafana 2.0 News +Grafana 2.0 with its new awesome backend written in Go is approaching beta. +The code is available in the [develop](https://github.com/grafana/grafana/tree/develop) branch. +[This blog post](http://grafana.org/blog/2015/02/10/Grafana-2-Alpha-and-preview.html) contains some news about it as well. + + ## Features ### Graphite Target Editor - Graphite target expression parser From 9c8134f8bc697ce43edcd93d2e9ef852f58a75d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 21 Feb 2015 21:19:51 +0100 Subject: [PATCH 2/2] Dashboard: Fixed memory leak when switching dashboards, Fixes #1497 --- CHANGELOG.md | 1 + src/app/features/dashboard/keybindings.js | 8 +------- src/app/services/keyboardManager.js | 12 ++++++++++-- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d5721604c4..330aad603f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - [Issue #1372](https://github.com/grafana/grafana/issues/1372). Graphite: Fix for nested complex queries, where a query references a query that references another query (ie the #[A-Z] syntax) - [Issue #1363](https://github.com/grafana/grafana/issues/1363). Templating: Fix to allow custom template variables to contain white space, now only splits on ',' - [Issue #1359](https://github.com/grafana/grafana/issues/1359). Graph: Fix for all series tooltip showing series with all null values when ``Hide Empty`` option is enabled +- [Issue #1497](https://github.com/grafana/grafana/issues/1497). Dashboard: Fixed memory leak when switching dashboards **Tech** - [Issue #1311](https://github.com/grafana/grafana/issues/1311). Tech: Updated Font-Awesome from 3.2 to 4.2 diff --git a/src/app/features/dashboard/keybindings.js b/src/app/features/dashboard/keybindings.js index 1557a3848d3..a076bbc2783 100644 --- a/src/app/features/dashboard/keybindings.js +++ b/src/app/features/dashboard/keybindings.js @@ -12,13 +12,7 @@ function(angular, $) { this.shortcuts = function(scope) { scope.$on('$destroy', function() { - keyboardManager.unbind('ctrl+f'); - keyboardManager.unbind('ctrl+h'); - keyboardManager.unbind('ctrl+s'); - keyboardManager.unbind('ctrl+r'); - keyboardManager.unbind('ctrl+z'); - keyboardManager.unbind('ctrl+o'); - keyboardManager.unbind('esc'); + keyboardManager.unbindAll(); }); var helpModalScope = null; diff --git a/src/app/services/keyboardManager.js b/src/app/services/keyboardManager.js index 10d5db03f45..f45ddad305b 100644 --- a/src/app/services/keyboardManager.js +++ b/src/app/services/keyboardManager.js @@ -1,7 +1,8 @@ define([ - 'angular' + 'angular', + 'lodash' ], -function (angular) { +function (angular, _) { 'use strict'; var module = angular.module('grafana.services'); @@ -252,6 +253,13 @@ function (angular) { elt['on' + opt['type']] = fct; } }; + + keyboardManagerService.unbindAll = function() { + _.each(keyboardManagerService.keyboardEvent, function(value, key) { + keyboardManagerService.unbind(key); + }); + }; + // Remove the shortcut - just specify the shortcut and I will remove the binding keyboardManagerService.unbind = function (label) { label = label.toLowerCase();