Chore: remove sql testdata (#38945)

This commit is contained in:
Ryan McKinley
2021-09-07 16:35:52 -07:00
committed by GitHub
parent 342b1426e5
commit 9aa03acfa6
4 changed files with 0 additions and 96 deletions
-1
View File
@@ -370,7 +370,6 @@ func (hs *HTTPServer) registerRoutes() {
// metrics
apiRoute.Post("/tsdb/query", bind(dtos.MetricRequest{}), routing.Wrap(hs.QueryMetrics))
apiRoute.Get("/tsdb/testdata/gensql", reqGrafanaAdmin, routing.Wrap(GenerateSQLTestData))
apiRoute.Get("/tsdb/testdata/random-walk", routing.Wrap(hs.GetTestDataRandomWalk))
// DataSource w/ expressions
-10
View File
@@ -8,7 +8,6 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/api/response"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/expr"
"github.com/grafana/grafana/pkg/models"
@@ -214,15 +213,6 @@ func (hs *HTTPServer) QueryMetrics(c *models.ReqContext, reqDto dtos.MetricReque
return response.JSON(statusCode, &resp)
}
// GET /api/tsdb/testdata/gensql
func GenerateSQLTestData(c *models.ReqContext) response.Response {
if err := bus.Dispatch(&models.InsertSQLTestDataCommand{}); err != nil {
return response.Error(500, "Failed to insert test data", err)
}
return response.JSON(200, &util.DynMap{"message": "OK"})
}
// GET /api/tsdb/testdata/random-walk
func (hs *HTTPServer) GetTestDataRandomWalk(c *models.ReqContext) response.Response {
from := c.Query("from")