AnnoListPanel: Fix interpolation of variables in tags (#42318)

pull/42169/head
François Dautrême 4 years ago committed by GitHub
parent 4d55c6fe51
commit 1d4b2593ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      public/app/plugins/panel/annolist/AnnoListPanel.test.tsx
  2. 2
      public/app/plugins/panel/annolist/AnnoListPanel.tsx

@ -76,7 +76,7 @@ async function setupTestContext({
onOptionsChange: jest.fn(), onOptionsChange: jest.fn(),
options, options,
renderCounter: 1, renderCounter: 1,
replaceVariables: jest.fn(), replaceVariables: (str: string) => str,
timeRange: getDefaultTimeRange(), timeRange: getDefaultTimeRange(),
timeZone: 'utc', timeZone: 'utc',
title: 'Test Title', title: 'Test Title',

@ -113,7 +113,7 @@ export class AnnoListPanel extends PureComponent<Props, State> {
} }
if (options.tags && options.tags.length) { if (options.tags && options.tags.length) {
params.tags = options.tags; params.tags = options.tags.map((tag) => this.props.replaceVariables(tag));
} }
if (queryTags.length) { if (queryTags.length) {

Loading…
Cancel
Save