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:
David Kaltschmidt
2018-10-31 17:48:36 +01:00
parent 749d7a2f0c
commit 4f959648a7
6 changed files with 111 additions and 60 deletions

View File

@@ -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([]);
};