mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 08:56:43 -06:00
Azure Monitor: Add support for numeric fields in ARG (#38728)
* Fix todouble/toreal not working * fix test
This commit is contained in:
parent
38ca27428d
commit
f2c4346cc4
@ -72,6 +72,7 @@ var converterMap = map[string]data.FieldConverter{
|
||||
"bool": boolConverter,
|
||||
"decimal": decimalConverter,
|
||||
"integer": intConverter,
|
||||
"number": decimalConverter,
|
||||
}
|
||||
|
||||
var stringConverter = data.FieldConverter{
|
||||
|
@ -115,10 +115,11 @@ func TestLogTableToFrame(t *testing.T) {
|
||||
data.NewField("XTimeSpan", nil, []*string{pointer.String("00:00:00.0000001")}),
|
||||
data.NewField("XDecimal", nil, []*float64{pointer.Float64(79228162514264337593543950335)}),
|
||||
data.NewField("XObject", nil, []*string{pointer.String(`"{\"person\": \"Daniel\", \"cats\": 23, \"diagnosis\": \"cat problem\"}"`)}),
|
||||
data.NewField("XNumber", nil, []*float64{pointer.Float64(79228162514264337593543950335)}),
|
||||
)
|
||||
frame.Meta = &data.FrameMeta{
|
||||
Custom: &LogAnalyticsMeta{ColumnTypes: []string{"bool", "string", "datetime",
|
||||
"dynamic", "guid", "int", "long", "real", "timespan", "decimal", "object"}},
|
||||
"dynamic", "guid", "int", "long", "real", "timespan", "decimal", "object", "number"}},
|
||||
}
|
||||
return frame
|
||||
},
|
||||
|
@ -46,6 +46,10 @@
|
||||
{
|
||||
"name":"XObject",
|
||||
"type":"object"
|
||||
},
|
||||
{
|
||||
"name":"XNumber",
|
||||
"type":"number"
|
||||
}
|
||||
],
|
||||
"rows": [
|
||||
@ -60,7 +64,8 @@
|
||||
1.7976931348623157e+308,
|
||||
"00:00:00.0000001",
|
||||
"79228162514264337593543950335",
|
||||
"{\"person\": \"Daniel\", \"cats\": 23, \"diagnosis\": \"cat problem\"}"
|
||||
"{\"person\": \"Daniel\", \"cats\": 23, \"diagnosis\": \"cat problem\"}",
|
||||
"79228162514264337593543950335"
|
||||
]
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user