mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: async starts of language provider
- changed `start()` to return promise on main language feature task - promise resolves to list of secondary tasks - speeds up time to interaction of metric selector - lazy loading of certain metric selector and log label selector items - loading indication of metric and log label selectors
This commit is contained in:
@@ -74,7 +74,7 @@ export default class PromQlLanguageProvider extends LanguageProvider {
|
||||
start = () => {
|
||||
if (!this.started) {
|
||||
this.started = true;
|
||||
return Promise.all([this.fetchMetricNames(), this.fetchHistogramMetrics()]);
|
||||
return this.fetchMetricNames().then(() => [this.fetchHistogramMetrics()]);
|
||||
}
|
||||
return Promise.resolve([]);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user