Loki: Rename the hint header (#42205)

X-Query-Tag -> X-Query-Tags (https://github.com/grafana/grafana/pull/42108#discussion_r755776672)
This commit is contained in:
Piotr Jamróz 2021-11-24 12:41:52 +01:00 committed by GitHub
parent a145ec37bb
commit 10f844e3ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -281,7 +281,7 @@ export class LokiDatasource
} }
const query = this.createRangeQuery(target, options, maxDataPoints); 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( return this._request(RANGE_QUERY_ENDPOINT, query, { headers }).pipe(
catchError((err) => throwError(() => this.processError(err, target))), catchError((err) => throwError(() => this.processError(err, target))),