mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Prometheus: Improve autocomplete performance and remove disabling of dynamic label lookup (#30199)
* processLabels: Use Sets instead of Array * Add and update comment * Limit autocomplete items to 10000 * Remove lookup treshold, limit display of items * Update tests * Add test * Update public/app/plugins/datasource/prometheus/language_provider.ts
This commit is contained in:
@@ -209,9 +209,9 @@ class PromQueryField extends React.PureComponent<PromQueryFieldProps, PromQueryF
|
||||
let hint = hints.length > 0 ? hints[0] : null;
|
||||
|
||||
// Hint for big disabled lookups
|
||||
if (!hint && !datasource.lookupsDisabled && datasource.languageProvider.lookupsDisabled) {
|
||||
if (!hint && datasource.lookupsDisabled) {
|
||||
hint = {
|
||||
label: `Dynamic label lookup is disabled for datasources with more than ${datasource.languageProvider.lookupMetricsThreshold} metrics.`,
|
||||
label: `Labels and metrics lookup was disabled in data source settings.`,
|
||||
type: 'INFO',
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user