fix: added dashboard and QB shortcuts to the sidenav (#4791)

This commit is contained in:
Vikrant Gupta 2024-04-02 11:31:42 +05:30 committed by GitHub
parent 1610b95b84
commit 3babce3ecf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 3 deletions

View File

@ -9,9 +9,10 @@ export const DashboardShortcuts = {
export const DashboardShortcutsName = {
SaveChanges: `${userOS === UserOperatingSystem.MACOS ? 'cmd' : 'ctrl'}+s`,
DiscardChanges: `${userOS === UserOperatingSystem.MACOS ? 'cmd' : 'ctrl'}+d`,
};
export const DashboardShortcutsDescription = {
SaveChanges: 'Save Changes',
DiscardChanges: 'Discard Changes',
SaveChanges: 'Save Changes for panel',
DiscardChanges: 'Discard Changes for panel',
};

View File

@ -13,5 +13,5 @@ export const QBShortcutsName = {
};
export const QBShortcutsDescription = {
StageAndRunQuery: 'Stage and Run the query',
StageAndRunQuery: 'Stage and Run the current query',
};

View File

@ -1,4 +1,9 @@
import { TableProps } from 'antd';
import {
DashboardShortcuts,
DashboardShortcutsDescription,
DashboardShortcutsName,
} from 'constants/shortcuts/DashboardShortcuts';
import {
GlobalShortcuts,
GlobalShortcutsDescription,
@ -9,16 +14,25 @@ import {
LogsExplorerShortcutsDescription,
LogsExplorerShortcutsName,
} from 'constants/shortcuts/logsExplorerShortcuts';
import {
QBShortcuts,
QBShortcutsDescription,
QBShortcutsName,
} from 'constants/shortcuts/QBShortcuts';
// eslint-disable-next-line @typescript-eslint/naming-convention
export const ALL_SHORTCUTS: Record<string, Record<string, string>> = {
'Global Shortcuts': GlobalShortcuts,
'Logs Explorer Shortcuts': LogsExplorerShortcuts,
'Query Builder Shortcuts': QBShortcuts,
'Dashboard Shortcuts': DashboardShortcuts,
};
export const ALL_SHORTCUTS_LABEL: Record<string, Record<string, string>> = {
'Global Shortcuts': GlobalShortcutsName,
'Logs Explorer Shortcuts': LogsExplorerShortcutsName,
'Query Builder Shortcuts': QBShortcutsName,
'Dashboard Shortcuts': DashboardShortcutsName,
};
export const ALL_SHORTCUTS_DESCRIPTION: Record<
@ -27,6 +41,8 @@ export const ALL_SHORTCUTS_DESCRIPTION: Record<
> = {
'Global Shortcuts': GlobalShortcutsDescription,
'Logs Explorer Shortcuts': LogsExplorerShortcutsDescription,
'Query Builder Shortcuts': QBShortcutsDescription,
'Dashboard Shortcuts': DashboardShortcutsDescription,
};
export const shortcutColumns = [