mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Azuremonitor: do not set unit if literal "Unspecified" (#26839)
part of #26828
This commit is contained in:
parent
8107e735c1
commit
62b103b843
@ -293,9 +293,11 @@ func (e *AzureMonitorDatasource) parseResponse(queryRes *tsdb.QueryResult, amr A
|
||||
dataField := frame.Fields[1]
|
||||
dataField.Name = amr.Value[0].Name.LocalizedValue
|
||||
dataField.Labels = labels
|
||||
dataField.SetConfig(&data.FieldConfig{
|
||||
Unit: toGrafanaUnit(amr.Value[0].Unit),
|
||||
})
|
||||
if amr.Value[0].Unit != "Unspecified" {
|
||||
dataField.SetConfig(&data.FieldConfig{
|
||||
Unit: toGrafanaUnit(amr.Value[0].Unit),
|
||||
})
|
||||
}
|
||||
if query.Alias != "" {
|
||||
dataField.Config.DisplayName = formatAzureMonitorLegendKey(query.Alias, query.UrlComponents["resourceName"],
|
||||
amr.Value[0].Name.LocalizedValue, "", "", amr.Namespace, amr.Value[0].ID, labels)
|
||||
|
Loading…
Reference in New Issue
Block a user