From dd0193a9a813e4ddf3b2e80dad7843e9ef18af08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 15 Oct 2014 15:48:57 -0400 Subject: [PATCH 1/5] Dashboard: removed wip stats panel from settings.js, accidental commit --- src/app/components/settings.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/components/settings.js b/src/app/components/settings.js index 38313aeb198..01f40c2e761 100644 --- a/src/app/components/settings.js +++ b/src/app/components/settings.js @@ -17,7 +17,6 @@ function (_, crypto) { window_title_prefix : 'Grafana - ', panels : { 'graph': { path: 'panels/graph' }, - 'stats': { path: 'panels/stats' }, 'text': { path: 'panels/text' } }, plugins : {}, From dd03a4b011e391dc846df4adce1b547710058920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 15 Oct 2014 17:37:08 -0400 Subject: [PATCH 2/5] Dashboard: fix for fullscreen mode and small gap sometimes showing the underlying dashboard --- src/css/less/grafana.less | 1 + 1 file changed, 1 insertion(+) diff --git a/src/css/less/grafana.less b/src/css/less/grafana.less index edc5605ee6b..ab9e9ee99b9 100644 --- a/src/css/less/grafana.less +++ b/src/css/less/grafana.less @@ -135,6 +135,7 @@ .main-view-container { height: 0; overflow: hidden; + padding: 0; } } From 9866e0851b5c02cede9597a79b86d5fc8d11a526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 16 Oct 2014 11:21:56 -0400 Subject: [PATCH 3/5] Graph: single series tooltip and unit format change fix, Closes #946 --- src/app/directives/grafanaGraph.tooltip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/directives/grafanaGraph.tooltip.js b/src/app/directives/grafanaGraph.tooltip.js index 4c3f5e434d8..3a4a9b1ac2a 100644 --- a/src/app/directives/grafanaGraph.tooltip.js +++ b/src/app/directives/grafanaGraph.tooltip.js @@ -153,7 +153,7 @@ function ($) { } // single series tooltip else if (item) { - series = item.series; + series = seriesList[item.seriesIndex]; group = ' ' + series.label; if (scope.panel.stack && scope.panel.tooltip.value_type === 'individual') { From e3e08cf8e79852adefc03fdc167e27b2e0113712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 18 Oct 2014 13:31:15 -0400 Subject: [PATCH 4/5] Graph: fix for second y axis tick unit labels wrapping on the next line, Fixes #505 --- CHANGELOG.md | 1 + src/vendor/jquery/jquery.flot.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 682904a08d8..a7b4bbd366a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ **Fixes** - [Issue #925](https://github.com/grafana/grafana/issues/925). Graph: bar width calculation fix for some edge cases (bars would render on top of each other) +- [Issue #505](https://github.com/grafana/grafana/issues/505). Graph: fix for second y axis tick unit labels wrapping on the next line ======= # 1.8.1 (2014-09-30) diff --git a/src/vendor/jquery/jquery.flot.js b/src/vendor/jquery/jquery.flot.js index 87a1b17c742..dc9e3677851 100644 --- a/src/vendor/jquery/jquery.flot.js +++ b/src/vendor/jquery/jquery.flot.js @@ -1416,7 +1416,8 @@ Licensed under the MIT license. var info = surface.getTextInfo(layer, t.label, font, null, maxWidth); - labelWidth = Math.max(labelWidth, info.width); + /// Grafana fix, add +1 to label width + labelWidth = Math.max(labelWidth, info.width + 1); labelHeight = Math.max(labelHeight, info.height); } From 16e79809828b423c9ecfedad33eb4c4ec724d2cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sun, 19 Oct 2014 12:30:41 -0400 Subject: [PATCH 5/5] Help: added help modal, accessed by shortcut '?', the help modal only contains a list of all shortcuts right now but will be extended in the future, #952 --- CHANGELOG.md | 1 + src/app/partials/help_modal.html | 46 +++++++++++++++++++ .../dashboard/dashboardKeyBindings.js | 20 +++++++- src/app/services/keyboardManager.js | 2 +- src/css/less/grafana.less | 6 +++ 5 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 src/app/partials/help_modal.html diff --git a/CHANGELOG.md b/CHANGELOG.md index a7b4bbd366a..dd27a6a6667 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ **Misc** - [Issue #938](https://github.com/grafana/grafana/issues/938). Panel: Plugin panels now reside outside of app/panels directory +- [Issue #952](https://github.com/grafana/grafana/issues/952). Help: Shortcut "?" to open help modal with list of all shortcuts **Fixes** - [Issue #925](https://github.com/grafana/grafana/issues/925). Graph: bar width calculation fix for some edge cases (bars would render on top of each other) diff --git a/src/app/partials/help_modal.html b/src/app/partials/help_modal.html new file mode 100644 index 00000000000..8fca3680fa0 --- /dev/null +++ b/src/app/partials/help_modal.html @@ -0,0 +1,46 @@ + + + diff --git a/src/app/services/dashboard/dashboardKeyBindings.js b/src/app/services/dashboard/dashboardKeyBindings.js index 987bb5a71ad..c87b07db622 100644 --- a/src/app/services/dashboard/dashboardKeyBindings.js +++ b/src/app/services/dashboard/dashboardKeyBindings.js @@ -8,7 +8,7 @@ function(angular, $) { var module = angular.module('grafana.services'); - module.service('dashboardKeybindings', function($rootScope, keyboardManager) { + module.service('dashboardKeybindings', function($rootScope, keyboardManager, $modal, $q) { this.shortcuts = function(scope) { @@ -22,6 +22,24 @@ function(angular, $) { keyboardManager.unbind('esc'); }); + var helpModalScope = null; + keyboardManager.bind('shift+¿', function() { + if (helpModalScope) { return; } + + helpModalScope = $rootScope.$new(); + var helpModal = $modal({ + template: './app/partials/help_modal.html', + persist: false, + show: false, + scope: helpModalScope, + keyboard: false + }); + + helpModalScope.$on('$destroy', function() { helpModalScope = null; }); + $q.when(helpModal).then(function(modalEl) { modalEl.modal('show'); }); + + }, { inputDisabled: true }); + keyboardManager.bind('ctrl+f', function() { scope.appEvent('show-dash-editor', { src: 'app/partials/search.html' }); }, { inputDisabled: true }); diff --git a/src/app/services/keyboardManager.js b/src/app/services/keyboardManager.js index 9875d74964f..72124fe76af 100644 --- a/src/app/services/keyboardManager.js +++ b/src/app/services/keyboardManager.js @@ -277,4 +277,4 @@ function (angular) { return keyboardManagerService; }]); -}); \ No newline at end of file +}); diff --git a/src/css/less/grafana.less b/src/css/less/grafana.less index ab9e9ee99b9..1f676b97531 100644 --- a/src/css/less/grafana.less +++ b/src/css/less/grafana.less @@ -552,3 +552,9 @@ select.grafana-target-segment-input { .grafana-tip { padding-left: 5px; } + +.shortcut-table { + td { padding: 3px; } + th:last-child { text-align: left; } + td:first-child { text-align: right; } +}