mirror of
https://github.com/grafana/grafana.git
synced 2025-01-27 16:57:14 -06:00
keyboard shortcut for taking snapshot
This commit is contained in:
parent
ed550a894f
commit
c2439b04c9
@ -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) {
|
||||
|
@ -44,6 +44,10 @@
|
||||
<td><span class="label label-info">CTRL+Z</span></td>
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue
Block a user