mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05:00
Azuremonitor: do not set unit if literal "Unspecified" (#26839)
part of #26828
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user