From e470786fb9f018cb9dd65bef2c2cb96409d29a88 Mon Sep 17 00:00:00 2001 From: utkarshcmu Date: Thu, 7 Apr 2016 01:30:49 -0700 Subject: [PATCH] Backward and forward arrows for time shift --- public/app/features/dashboard/keybindings.js | 8 ++++++ .../dashboard/timepicker/timepicker.html | 10 +++++++ .../dashboard/timepicker/timepicker.ts | 26 +++++++++++++++++++ public/app/partials/help_modal.html | 8 ++++++ 4 files changed, 52 insertions(+) diff --git a/public/app/features/dashboard/keybindings.js b/public/app/features/dashboard/keybindings.js index aea3a476a49..b07dd2fd848 100644 --- a/public/app/features/dashboard/keybindings.js +++ b/public/app/features/dashboard/keybindings.js @@ -60,6 +60,14 @@ function(angular, $) { scope.appEvent('zoom-out', evt); }, { inputDisabled: true }); + keyboardManager.bind('left', function(evt) { + scope.appEvent('shift-time-backward', evt); + }, { inputDisabled: true }); + + keyboardManager.bind('right', function(evt) { + scope.appEvent('shift-time-forward', evt); + }, { inputDisabled: true }); + keyboardManager.bind('ctrl+e', function(evt) { scope.appEvent('export-dashboard', evt); }, { inputDisabled: true }); diff --git a/public/app/features/dashboard/timepicker/timepicker.html b/public/app/features/dashboard/timepicker/timepicker.html index 609b5905983..b311d2592fb 100644 --- a/public/app/features/dashboard/timepicker/timepicker.html +++ b/public/app/features/dashboard/timepicker/timepicker.html @@ -1,5 +1,15 @@