Prometheus: Create jsonschema spec (#85077)

This commit is contained in:
Ryan McKinley
2024-03-26 16:36:39 +03:00
committed by GitHub
parent b47dc7e8ac
commit e5cf863973
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),
}