mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 00:25:46 -06:00
Chore: fixes Loki annotation tags deduplication (#24275)
This commit is contained in:
parent
c0a1319a25
commit
fa260fec87
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user