mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Arrow: move arrow support from frontend to backend only (#32575)
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
"github.com/grafana/grafana/pkg/middleware"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/plugins"
|
||||
"github.com/grafana/grafana/pkg/services/datasourceproxy"
|
||||
"github.com/grafana/grafana/pkg/services/datasources"
|
||||
"github.com/grafana/grafana/pkg/services/ngalert/eval"
|
||||
@@ -131,14 +130,9 @@ func (api *API) conditionEvalEndpoint(c *models.ReqContext, cmd ngmodels.EvalAle
|
||||
}
|
||||
|
||||
frame := evalResults.AsDataFrame()
|
||||
df := plugins.NewDecodedDataFrames([]*data.Frame{&frame})
|
||||
instances, err := df.Encoded()
|
||||
if err != nil {
|
||||
return response.Error(400, "Failed to encode result dataframes", err)
|
||||
}
|
||||
|
||||
return response.JSON(200, util.DynMap{
|
||||
"instances": instances,
|
||||
return response.JSONStreaming(200, util.DynMap{
|
||||
"instances": []*data.Frame{&frame},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -162,17 +156,8 @@ func (api *API) alertDefinitionEvalEndpoint(c *models.ReqContext) response.Respo
|
||||
}
|
||||
frame := evalResults.AsDataFrame()
|
||||
|
||||
df := plugins.NewDecodedDataFrames([]*data.Frame{&frame})
|
||||
if err != nil {
|
||||
return response.Error(400, "Failed to instantiate Dataframes from the decoded frames", err)
|
||||
}
|
||||
|
||||
instances, err := df.Encoded()
|
||||
if err != nil {
|
||||
return response.Error(400, "Failed to encode result dataframes", err)
|
||||
}
|
||||
return response.JSON(200, util.DynMap{
|
||||
"instances": instances,
|
||||
return response.JSONStreaming(200, util.DynMap{
|
||||
"instances": []*data.Frame{&frame},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user