* shared location config
* shared locaiton config
* shared locaiton config
* remove file
* add alpha annotations
* chore: set is already ordered
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 968817b151)
Co-authored-by: An <an.le@grafana.com>
This commit is contained in:
@@ -156,21 +156,17 @@ export function reduceSeriesToRows(
|
||||
}
|
||||
|
||||
export function getDistinctLabelKeys(frames: DataFrame[]): string[] {
|
||||
const ordered: string[] = [];
|
||||
const keys = new Set<string>();
|
||||
for (const frame of frames) {
|
||||
for (const field of frame.fields) {
|
||||
if (field.labels) {
|
||||
for (const k of Object.keys(field.labels)) {
|
||||
if (!keys.has(k)) {
|
||||
ordered.push(k);
|
||||
keys.add(k);
|
||||
}
|
||||
keys.add(k);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ordered;
|
||||
return [...keys];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user