mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
loki: rename ResponseModel to QueryModel (#42794)
This commit is contained in:
parent
2af5ad4764
commit
6686f8c345
@ -64,7 +64,7 @@ type datasourceInfo struct {
|
|||||||
TimeInterval string `json:"timeInterval"`
|
TimeInterval string `json:"timeInterval"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResponseModel struct {
|
type QueryModel struct {
|
||||||
Expr string `json:"expr"`
|
Expr string `json:"expr"`
|
||||||
LegendFormat string `json:"legendFormat"`
|
LegendFormat string `json:"legendFormat"`
|
||||||
Interval string `json:"interval"`
|
Interval string `json:"interval"`
|
||||||
|
@ -40,7 +40,7 @@ func interpolateVariables(expr string, interval time.Duration, timeRange time.Du
|
|||||||
func parseQuery(dsInfo *datasourceInfo, queryContext *backend.QueryDataRequest) ([]*lokiQuery, error) {
|
func parseQuery(dsInfo *datasourceInfo, queryContext *backend.QueryDataRequest) ([]*lokiQuery, error) {
|
||||||
qs := []*lokiQuery{}
|
qs := []*lokiQuery{}
|
||||||
for _, query := range queryContext.Queries {
|
for _, query := range queryContext.Queries {
|
||||||
model := &ResponseModel{}
|
model := &QueryModel{}
|
||||||
err := json.Unmarshal(query.JSON, model)
|
err := json.Unmarshal(query.JSON, model)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user