From e2f3ce17038be787bed57eff56c4a2804d39bb94 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Mon, 26 Sep 2022 19:19:58 -0400 Subject: [PATCH] Tempo: Wrap the autocomplete value for a tag in double quotes (#55610) (#55637) (cherry picked from commit 4be78095c9398fda277eb0c6b1e8eaf6e78680e0) Co-authored-by: Hamas Shafiq --- public/app/plugins/datasource/tempo/language_provider.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/tempo/language_provider.ts b/public/app/plugins/datasource/tempo/language_provider.ts index 27c13e5516e..5b6aee44a32 100644 --- a/public/app/plugins/datasource/tempo/language_provider.ts +++ b/public/app/plugins/datasource/tempo/language_provider.ts @@ -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 };