Explore: Keyboard shortcut to go to explore (#61837)

This commit is contained in:
Torkel Ödegaard 2023-01-20 13:54:58 +01:00 committed by GitHub
parent a960b55a99
commit ce879ac8e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import { Modal, useStyles2 } from '@grafana/ui';
const shortcuts = {
Global: [
{ keys: ['g', 'h'], description: 'Go to Home Dashboard' },
{ keys: ['g', 'e'], description: 'Go to Explore' },
{ keys: ['g', 'p'], description: 'Go to Profile' },
{ keys: ['s', 'o'], description: 'Open search' },
{ keys: ['esc'], description: 'Exit edit/setting views' },

View File

@ -38,6 +38,7 @@ export class KeybindingSrv {
this.bind('g h', this.goToHome);
this.bind('g a', this.openAlerting);
this.bind('g p', this.goToProfile);
this.bind('g e', this.goToExplore);
this.bind('s o', this.openSearch);
this.bind('t a', this.makeAbsoluteTime);
this.bind('f', this.openSearch);
@ -111,6 +112,10 @@ export class KeybindingSrv {
this.locationService.push('/profile');
}
private goToExplore() {
this.locationService.push('/explore');
}
private makeAbsoluteTime() {
appEvents.publish(new AbsoluteTimeEvent());
}