Tempo: If no search tag then do not query API for tag values (#72522)

* If no tag then do not query api for tag values

* Update test
alert-instance-manager-ruler-wip
Joey 2 years ago committed by GitHub
parent ed9dc63326
commit 7612f3d955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      public/app/plugins/datasource/tempo/SearchTraceQLEditor/SearchField.test.tsx
  2. 2
      public/app/plugins/datasource/tempo/SearchTraceQLEditor/SearchField.tsx

@ -128,7 +128,7 @@ describe('SearchField', () => {
};
const { container } = renderSearchField(updateFilter, filter, ['tag1', 'tag22', 'tag33']);
const select = await container.querySelector(`input[aria-label="select test1 tag"]`);
const select = container.querySelector(`input[aria-label="select test1 tag"]`);
expect(select).not.toBeNull();
expect(select).toBeInTheDocument();
if (select) {

@ -60,7 +60,7 @@ const SearchField = ({
const updateOptions = async () => {
try {
return await languageProvider.getOptionsV2(scopedTag);
return filter.tag ? await languageProvider.getOptionsV2(scopedTag) : [];
} catch (error) {
// Display message if Tempo is connected but search 404's
if (isFetchError(error) && error?.status === 404) {

Loading…
Cancel
Save