Added keyboard shortcut to export dashboard

This commit is contained in:
utkarshcmu 2016-02-23 00:55:34 -08:00
parent 590da0cab3
commit 6506161107
2 changed files with 5 additions and 0 deletions

View File

@ -12,6 +12,7 @@ export class DashNavCtrl {
$scope.init = function() {
$scope.onAppEvent('save-dashboard', $scope.saveDashboard);
$scope.onAppEvent('delete-dashboard', $scope.deleteDashboard);
$scope.onAppEvent('export-dashboard', $scope.snapshot);
$scope.showSettingsMenu = $scope.dashboardMeta.canEdit || $scope.contextSrv.isEditor;

View File

@ -60,6 +60,10 @@ function(angular, $) {
scope.appEvent('zoom-out', evt);
}, { inputDisabled: true });
keyboardManager.bind('ctrl+e', function(evt) {
scope.appEvent('export-dashboard', evt);
}, { inputDisabled: true });
keyboardManager.bind('esc', function() {
var popups = $('.popover.in');
if (popups.length > 0) {