Tempo: Wrap the autocomplete value for a tag in double quotes (#55610) (#55637)

(cherry picked from commit 4be78095c9)

Co-authored-by: Hamas Shafiq <hamas.shafiq@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2022-09-27 00:19:58 +01:00
committed by GitHub
co-authored by Hamas Shafiq
parent 51144a427f
commit e2f3ce1703
@@ -69,12 +69,13 @@ export default class TempoLanguageProvider extends LanguageProvider {
tagName = tagName.split('=')[0];
const response = await this.request(`/api/search/tag/${tagName}/values`, []);
const suggestions: CompletionItemGroup[] = [];
if (response && response.tagValues) {
suggestions.push({
label: `Tag Values`,
items: response.tagValues.map((tagValue: string) => ({ label: tagValue })),
items: response.tagValues.map((tagValue: string) => ({ label: tagValue, insertText: `"${tagValue}"` })),
});
}
return { suggestions };