Commit c2439b04 by utkarshcmu

keyboard shortcut for taking snapshot

parent ed550a89
......@@ -13,6 +13,7 @@ export class DashNavCtrl {
$scope.onAppEvent('save-dashboard', $scope.saveDashboard);
$scope.onAppEvent('delete-dashboard', $scope.deleteDashboard);
$scope.onAppEvent('export-dashboard', $scope.snapshot);
$scope.onAppEvent('quick-snapshot', $scope.quickSnapshot);
$scope.showSettingsMenu = $scope.dashboardMeta.canEdit || $scope.contextSrv.isEditor;
......@@ -53,6 +54,10 @@ export class DashNavCtrl {
});
};
$scope.quickSnapshot = function() {
$scope.shareDashboard(1);
};
$scope.openSearch = function() {
$scope.appEvent('show-dash-search');
};
......
......@@ -64,6 +64,10 @@ function(angular, $) {
scope.appEvent('export-dashboard', evt);
}, { inputDisabled: true });
keyboardManager.bind('ctrl+q', function(evt) {
scope.appEvent('quick-snapshot', evt);
}, { inputDisabled: true });
keyboardManager.bind('esc', function() {
var popups = $('.popover.in');
if (popups.length > 0) {
......
......@@ -45,6 +45,10 @@
<td>Zoom out</td>
</tr>
<tr>
<td><span class="label label-info">CTRL+Q</span></td>
<td>Quick snapshot</td>
</tr>
<tr>
<td><span class="label label-info">CTRL+O</span></td>
<td>Enable/Disable shared graph crosshair</td>
</tr>
......
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