InfluxDB: SQL Query Editor (#72168)
* Add influxdbSqlSupport feature toggle * Add SQL option to the config page * Add SQL backend * Add metadata support in config page * Implement unified querying * Fix healthcheck query * fsql tests * secure grpc by default * code cleanup * Query handing for sql mode * Implement a placeholder sql editor * Fix query language dropdown * drop in SQL editor * switch to use rawSql, get sql editor working * fix healthcheck * WIP * memoize component to stop unwanted rerender onQuery * dont reinit datasource on each render of the editor * remove useless memo * clean up * Fix the link * Alpha state warning * Remove console.logs * update model for fsql * remove unused --------- Co-authored-by: Galen <galen.kistler@grafana.com>
This commit is contained in:
@@ -17,10 +17,10 @@ type queryModel struct {
|
||||
// to [(*FlightSQLDatasource).QueryData].
|
||||
type queryRequest struct {
|
||||
RefID string `json:"refId"`
|
||||
RawQuery string `json:"query"`
|
||||
RawQuery string `json:"rawSql"`
|
||||
IntervalMilliseconds int `json:"intervalMs"`
|
||||
MaxDataPoints int64 `json:"maxDataPoints"`
|
||||
Format string `json:"resultFormat"`
|
||||
Format string `json:"format"`
|
||||
}
|
||||
|
||||
func getQueryModel(dataQuery backend.DataQuery) (*queryModel, error) {
|
||||
|
||||
@@ -124,7 +124,7 @@ func CheckSQLHealth(ctx context.Context, dsInfo *models.DatasourceInfo, req *bac
|
||||
Queries: []backend.DataQuery{
|
||||
{
|
||||
RefID: refID,
|
||||
JSON: []byte(`{ "query": "select 1", "resultFormat": "table" }`),
|
||||
JSON: []byte(`{ "rawSql": "select 1", "format": "table" }`),
|
||||
Interval: 1 * time.Minute,
|
||||
MaxDataPoints: 423,
|
||||
TimeRange: backend.TimeRange{
|
||||
|
||||
Reference in New Issue
Block a user