fix: trace explorer and home page keyboard shortcut (#8934)

This commit is contained in:
Vishal Sharma 2025-08-27 23:49:54 +05:30 committed by GitHub
parent f6bc30050b
commit df54e6350d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 7 deletions

View File

@ -25,11 +25,11 @@ export const GlobalShortcutsName = {
export const GlobalShortcutsDescription = {
NavigateToHome: 'Navigate to Home',
NavigateToServices: 'Navigate to Services page',
NavigateToTraces: 'Navigate to Traces page',
NavigateToLogs: 'Navigate to logs page',
NavigateToDashboards: 'Navigate to dashboards page',
NavigateToAlerts: 'Navigate to alerts page',
NavigateToExceptions: 'Navigate to Exceptions page',
NavigateToMessagingQueues: 'Navigate to Messaging Queues page',
NavigateToTraces: 'Navigate to Traces Explorer',
NavigateToLogs: 'Navigate to Logs Explorer',
NavigateToDashboards: 'Navigate to Dashboards List',
NavigateToAlerts: 'Navigate to Alerts List',
NavigateToExceptions: 'Navigate to Exceptions List',
NavigateToMessagingQueues: 'Navigate to Messaging Queues',
ToggleSidebar: 'Toggle sidebar visibility',
};

View File

@ -647,11 +647,14 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {
};
useEffect(() => {
registerShortcut(GlobalShortcuts.NavigateToHome, () =>
onClickHandler(ROUTES.HOME, null),
);
registerShortcut(GlobalShortcuts.NavigateToServices, () =>
onClickHandler(ROUTES.APPLICATION, null),
);
registerShortcut(GlobalShortcuts.NavigateToTraces, () =>
onClickHandler(ROUTES.TRACE, null),
onClickHandler(ROUTES.TRACES_EXPLORER, null),
);
registerShortcut(GlobalShortcuts.NavigateToLogs, () =>
@ -674,6 +677,7 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {
);
return (): void => {
deregisterShortcut(GlobalShortcuts.NavigateToHome);
deregisterShortcut(GlobalShortcuts.NavigateToServices);
deregisterShortcut(GlobalShortcuts.NavigateToTraces);
deregisterShortcut(GlobalShortcuts.NavigateToLogs);