Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added dashboard and QB shortcuts to the shortcuts page #4791

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions frontend/src/constants/shortcuts/DashboardShortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
};
2 changes: 1 addition & 1 deletion frontend/src/constants/shortcuts/QBShortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export const QBShortcutsName = {
};

export const QBShortcutsDescription = {
StageAndRunQuery: 'Stage and Run the query',
StageAndRunQuery: 'Stage and Run the current query',
};
16 changes: 16 additions & 0 deletions frontend/src/pages/Shortcuts/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { TableProps } from 'antd';
import {
DashboardShortcuts,
DashboardShortcutsDescription,
DashboardShortcutsName,
} from 'constants/shortcuts/DashboardShortcuts';
import {
GlobalShortcuts,
GlobalShortcutsDescription,
Expand All @@ -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<
Expand All @@ -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 = [
Expand Down
Loading