Chore: fixes Loki annotation tags deduplication (#24275)
(cherry picked from commit fa260fec87)
This commit is contained in:
committed by
Arve Knudsen
parent
dcdedaca82
commit
56622c2ba1
@@ -355,6 +355,7 @@ describe('LokiDatasource', () => {
|
||||
{
|
||||
stream: {
|
||||
label: 'value',
|
||||
label2: 'value ',
|
||||
},
|
||||
values: [['1549016857498000000', 'hello']],
|
||||
},
|
||||
|
||||
@@ -497,7 +497,7 @@ export class LokiDatasource extends DataSourceApi<LokiQuery, LokiOptions> {
|
||||
const tags: string[] = [];
|
||||
for (const field of frame.fields) {
|
||||
if (field.labels) {
|
||||
tags.push.apply(tags, Object.values(field.labels));
|
||||
tags.push.apply(tags, [...new Set(Object.values(field.labels).map((label: string) => label.trim()))]);
|
||||
}
|
||||
}
|
||||
const view = new DataFrameView<{ ts: string; line: string }>(frame);
|
||||
|
||||
Reference in New Issue
Block a user