[v11.0.x] Prometheus: Create jsonschema spec (#86197)

Prometheus: Create jsonschema spec (#85077)

(cherry picked from commit e5cf863973)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-04-15 16:52:53 +01:00
committed by GitHub
co-authored by Ryan McKinley
parent e00a5ec73e
commit 8d366eb67c
9 changed files with 679 additions and 14 deletions
+3 -2
View File
@@ -14,6 +14,7 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/experimental"
sdkapi "github.com/grafana/grafana-plugin-sdk-go/experimental/apis/data/v0alpha1"
"github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/promlib/models"
@@ -113,8 +114,8 @@ func loadStoredQuery(fileName string) (*backend.QueryDataRequest, error) {
Expr: sq.Expr,
LegendFormat: sq.LegendFormat,
},
CommonQueryProperties: models.CommonQueryProperties{
IntervalMs: sq.Step * 1000,
CommonQueryProperties: sdkapi.CommonQueryProperties{
IntervalMS: float64(sq.Step * 1000),
},
Interval: fmt.Sprintf("%ds", sq.Step),
}