mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 12:44:10 -06:00
allow unit override if cloudwatch response unit is none
This commit is contained in:
parent
e465b2d53a
commit
4687ce2f7b
@ -137,7 +137,11 @@ export default class CloudWatchDatasource {
|
||||
if (res.results) {
|
||||
_.forEach(res.results, queryRes => {
|
||||
_.forEach(queryRes.series, series => {
|
||||
data.push({ target: series.name, datapoints: series.points, unit: queryRes.meta.unit || 'none' });
|
||||
const s = { target: series.name, datapoints: series.points } as any;
|
||||
if (queryRes.meta.unit) {
|
||||
s.unit = queryRes.meta.unit;
|
||||
}
|
||||
data.push(s);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user