Commit dfe2ab95 by Andreas Opferkuch Committed by GitHub

Prometheus: Show "Loading metrics..." when switching sources (#24292)

syntaxLoaded needed resetting at the beginning of refreshing
metrics.

Fixes #24291
parent 7dee3e27
......@@ -187,6 +187,10 @@ class PromQueryField extends React.PureComponent<PromQueryFieldProps, PromQueryF
datasource: { languageProvider },
} = this.props;
this.setState({
syntaxLoaded: false,
});
Prism.languages[PRISM_SYNTAX] = languageProvider.syntax;
this.languageProviderInitializationPromise = makePromiseCancelable(languageProvider.start());
this.languageProviderInitializationPromise.promise
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment