diff --git a/CHANGELOG.md b/CHANGELOG.md index 67ab576..1a3cb75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,27 @@ # Changelog +## 1.0.5 + +- Fix default granulatiry. + ## 1.0.4 + - Use Grafana httpclient lib. - Fix datasource healthcheck. ## 1.0.3 + - Improve query editor with selects. ## 1.0.2 + - Add multi-metric support. - Automatically setup granularity. ## 1.0.1 -- Migrate to Backend Plugin for security reasons + +- Migrate to Backend Plugin for security reasons. + ## 1.0.0 (Unreleased) -- Initial release. + +- Initial release. diff --git a/package.json b/package.json index 7b4dbd6..a8c37c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nedimar-youbora-datasource", - "version": "1.0.4", + "version": "1.0.5", "description": "NPAW's Youbora data source plugin", "scripts": { "build": "grafana-toolkit plugin:build", diff --git a/pkg/plugin/parsers.go b/pkg/plugin/parsers.go index 554a96a..54f9e0f 100644 --- a/pkg/plugin/parsers.go +++ b/pkg/plugin/parsers.go @@ -55,10 +55,10 @@ func ParseQuery(dq backend.DataQuery, qm *QueryModel) error { // setup granularity. qm.Granularity = "minute" - if dq.Interval.Minutes() > 0.8 { + if dq.Interval.Minutes() > 120 { qm.Granularity = "hour" } - if dq.Interval.Hours() > 0.8 { + if dq.Interval.Hours() > 48 { qm.Granularity = "day" }