InfluxDB: update flux library and support boolean label values (#29310)

This commit is contained in:
Ryan McKinley
2020-11-23 13:19:52 -08:00
committed by GitHub
parent 83329ae7e4
commit cfaca42e97
8 changed files with 167 additions and 135 deletions
+4 -3
View File
@@ -209,9 +209,10 @@ func (fb *frameBuilder) Append(record *query.FluxRecord) error {
// set the labels
labels := make(map[string]string)
for _, name := range fb.labels {
val, ok := record.ValueByKey(name).(string)
if ok {
labels[name] = val
val := record.ValueByKey(name)
str := fmt.Sprintf("%v", val)
if val != nil && str != "" {
labels[name] = str
}
}
fb.active.Fields[1].Labels = labels