mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 08:18:10 -05:00
datatrails: fix: clearly identify unspecified label values (#84474)
fix: clearly identify unspecified label values
This commit is contained in:
@@ -312,15 +312,11 @@ function buildNormalLayout(queryDef: AutoQueryDef) {
|
||||
}
|
||||
|
||||
function getLabelValue(frame: DataFrame) {
|
||||
const labels = frame.fields[1]?.labels;
|
||||
|
||||
if (!labels) {
|
||||
return 'No labels';
|
||||
}
|
||||
const labels = frame.fields[1]?.labels || {};
|
||||
|
||||
const keys = Object.keys(labels);
|
||||
if (keys.length === 0) {
|
||||
return 'No labels';
|
||||
return '<unspecified>';
|
||||
}
|
||||
|
||||
return labels[keys[0]];
|
||||
|
||||
Reference in New Issue
Block a user