Loki: Rename the hint header (#42205)

X-Query-Tag -> X-Query-Tags (https://github.com/grafana/grafana/pull/42108#discussion_r755776672)
pull/42060/head
Piotr Jamróz 4 years ago committed by GitHub
parent a145ec37bb
commit 10f844e3ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      public/app/plugins/datasource/loki/datasource.test.ts
  2. 2
      public/app/plugins/datasource/loki/datasource.ts

@ -188,7 +188,7 @@ describe('LokiDatasource', () => {
expect(backendSrv.fetch).toBeCalledWith(
expect.objectContaining({
headers: {
'X-Query-Tag': 'Source=logvolhist',
'X-Query-Tags': 'Source=logvolhist',
},
})
);
@ -200,7 +200,7 @@ describe('LokiDatasource', () => {
expect(backendSrv.fetch).not.toBeCalledWith(
expect.objectContaining({
headers: {
'X-Query-Tag': 'Source=logvolhist',
'X-Query-Tags': 'Source=logvolhist',
},
})
);

@ -281,7 +281,7 @@ export class LokiDatasource
}
const query = this.createRangeQuery(target, options, maxDataPoints);
const headers = target.volumeQuery ? { 'X-Query-Tag': 'Source=logvolhist' } : undefined;
const headers = target.volumeQuery ? { 'X-Query-Tags': 'Source=logvolhist' } : undefined;
return this._request(RANGE_QUERY_ENDPOINT, query, { headers }).pipe(
catchError((err) => throwError(() => this.processError(err, target))),

Loading…
Cancel
Save