mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Command Palette: Adjust command palette extensions priority (#79992)
adjust command palette extensions priority
This commit is contained in:
parent
5c67c4b082
commit
d680a020cc
@ -8,7 +8,7 @@ import impressionSrv from 'app/core/services/impression_srv';
|
||||
import { getGrafanaSearcher } from 'app/features/search/service';
|
||||
|
||||
import { CommandPaletteAction } from '../types';
|
||||
import { RECENT_DASHBOARDS_PRORITY, SEARCH_RESULTS_PRORITY } from '../values';
|
||||
import { RECENT_DASHBOARDS_PRIORITY, SEARCH_RESULTS_PRIORITY } from '../values';
|
||||
|
||||
const MAX_SEARCH_RESULTS = 100;
|
||||
const MAX_RECENT_DASHBOARDS = 5;
|
||||
@ -41,7 +41,7 @@ export async function getRecentDashboardActions(): Promise<CommandPaletteAction[
|
||||
id: `recent-dashboards${url}`,
|
||||
name: `${name}`,
|
||||
section: t('command-palette.section.recent-dashboards', 'Recent dashboards'),
|
||||
priority: RECENT_DASHBOARDS_PRORITY,
|
||||
priority: RECENT_DASHBOARDS_PRIORITY,
|
||||
url,
|
||||
};
|
||||
});
|
||||
@ -70,7 +70,7 @@ export async function getSearchResultActions(searchQuery: string): Promise<Comma
|
||||
kind === 'dashboard'
|
||||
? t('command-palette.section.dashboard-search-results', 'Dashboards')
|
||||
: t('command-palette.section.folder-search-results', 'Folders'),
|
||||
priority: SEARCH_RESULTS_PRORITY,
|
||||
priority: SEARCH_RESULTS_PRIORITY,
|
||||
url,
|
||||
subtitle: data.view.dataFrame.meta?.custom?.locationInfo[location]?.name,
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
export const RECENT_DASHBOARDS_PRORITY = 6;
|
||||
export const EXTENSIONS_PRIORITY = 5;
|
||||
export const ACTIONS_PRIORITY = 4;
|
||||
export const DEFAULT_PRIORITY = 3;
|
||||
export const PREFERENCES_PRIORITY = 2;
|
||||
export const SEARCH_RESULTS_PRORITY = 1; // Dynamic actions should be below static ones so the list doesn't 'jump' when they come in
|
||||
export const RECENT_DASHBOARDS_PRIORITY = 6;
|
||||
export const ACTIONS_PRIORITY = 5;
|
||||
export const DEFAULT_PRIORITY = 4;
|
||||
export const PREFERENCES_PRIORITY = 3;
|
||||
export const EXTENSIONS_PRIORITY = 2;
|
||||
export const SEARCH_RESULTS_PRIORITY = 1; // Dynamic actions should be below static ones so the list doesn't 'jump' when they come in
|
||||
|
Loading…
Reference in New Issue
Block a user