Merge pull request #3544 from influxdata/md-platform-query
Use platform query package instead of ifql for ifql builder endpointspull/10616/head
commit
edb919408a
|
@ -11,12 +11,6 @@
|
||||||
packages = ["."]
|
packages = ["."]
|
||||||
revision = "3ec0642a7fb6488f65b06f9040adc67e3990296a"
|
revision = "3ec0642a7fb6488f65b06f9040adc67e3990296a"
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
name = "github.com/beorn7/perks"
|
|
||||||
packages = ["quantile"]
|
|
||||||
revision = "3a771d992973f24aa725d07868b467d1ddfceafb"
|
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
name = "github.com/boltdb/bolt"
|
name = "github.com/boltdb/bolt"
|
||||||
packages = ["."]
|
packages = ["."]
|
||||||
|
@ -46,7 +40,6 @@
|
||||||
[[projects]]
|
[[projects]]
|
||||||
name = "github.com/gogo/protobuf"
|
name = "github.com/gogo/protobuf"
|
||||||
packages = [
|
packages = [
|
||||||
"codec",
|
|
||||||
"gogoproto",
|
"gogoproto",
|
||||||
"jsonpb",
|
"jsonpb",
|
||||||
"plugin/compare",
|
"plugin/compare",
|
||||||
|
@ -107,25 +100,6 @@
|
||||||
packages = ["query"]
|
packages = ["query"]
|
||||||
revision = "53e6ce116135b80d037921a7fdd5138cf32d7a8a"
|
revision = "53e6ce116135b80d037921a7fdd5138cf32d7a8a"
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
name = "github.com/influxdata/ifql"
|
|
||||||
packages = [
|
|
||||||
".",
|
|
||||||
"ast",
|
|
||||||
"compiler",
|
|
||||||
"complete",
|
|
||||||
"functions",
|
|
||||||
"interpreter",
|
|
||||||
"parser",
|
|
||||||
"query",
|
|
||||||
"query/control",
|
|
||||||
"query/execute",
|
|
||||||
"query/execute/storage",
|
|
||||||
"query/plan",
|
|
||||||
"semantic"
|
|
||||||
]
|
|
||||||
revision = "9445c4494d4421db2ab1aaaf6f4069446f11752e"
|
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
name = "github.com/influxdata/influxdb"
|
name = "github.com/influxdata/influxdb"
|
||||||
packages = [
|
packages = [
|
||||||
|
@ -152,6 +126,35 @@
|
||||||
]
|
]
|
||||||
revision = "4f10efc41b4dcac070495cf95ba2c41cfcc2aa3a"
|
revision = "4f10efc41b4dcac070495cf95ba2c41cfcc2aa3a"
|
||||||
|
|
||||||
|
[[projects]]
|
||||||
|
branch = "master"
|
||||||
|
name = "github.com/influxdata/line-protocol"
|
||||||
|
packages = ["."]
|
||||||
|
revision = "32c6aa80de5eb09d190ad284a8214a531c6bce57"
|
||||||
|
|
||||||
|
[[projects]]
|
||||||
|
branch = "master"
|
||||||
|
name = "github.com/influxdata/platform"
|
||||||
|
packages = [
|
||||||
|
".",
|
||||||
|
"query",
|
||||||
|
"query/ast",
|
||||||
|
"query/builtin",
|
||||||
|
"query/compiler",
|
||||||
|
"query/complete",
|
||||||
|
"query/csv",
|
||||||
|
"query/execute",
|
||||||
|
"query/functions",
|
||||||
|
"query/functions/storage",
|
||||||
|
"query/id",
|
||||||
|
"query/interpreter",
|
||||||
|
"query/parser",
|
||||||
|
"query/plan",
|
||||||
|
"query/semantic",
|
||||||
|
"query/values"
|
||||||
|
]
|
||||||
|
revision = "6b2cf4e666447f73e6a6d7368cd6b4698f1de91f"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
name = "github.com/influxdata/tdigest"
|
name = "github.com/influxdata/tdigest"
|
||||||
|
@ -163,23 +166,6 @@
|
||||||
packages = ["v1"]
|
packages = ["v1"]
|
||||||
revision = "6d3895376368aa52a3a81d2a16e90f0f52371967"
|
revision = "6d3895376368aa52a3a81d2a16e90f0f52371967"
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
name = "github.com/influxdata/yamux"
|
|
||||||
packages = ["."]
|
|
||||||
revision = "1f58ded512de5feabbe30b60c7d33a7a896c5f16"
|
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
name = "github.com/influxdata/yarpc"
|
|
||||||
packages = [
|
|
||||||
".",
|
|
||||||
"codes",
|
|
||||||
"status",
|
|
||||||
"yarpcproto"
|
|
||||||
]
|
|
||||||
revision = "f0da2db138cad2fb425541938fc28dd5a5bc6918"
|
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
name = "github.com/jessevdk/go-flags"
|
name = "github.com/jessevdk/go-flags"
|
||||||
packages = ["."]
|
packages = ["."]
|
||||||
|
@ -190,12 +176,6 @@
|
||||||
packages = ["."]
|
packages = ["."]
|
||||||
revision = "46eb4c183bfc1ebb527d9d19bcded39476302eb8"
|
revision = "46eb4c183bfc1ebb527d9d19bcded39476302eb8"
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
name = "github.com/matttproud/golang_protobuf_extensions"
|
|
||||||
packages = ["pbutil"]
|
|
||||||
revision = "3247c84500bff8d9fb6d579d800f20b3e091582c"
|
|
||||||
version = "v1.0.0"
|
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
name = "github.com/opentracing/opentracing-go"
|
name = "github.com/opentracing/opentracing-go"
|
||||||
packages = [
|
packages = [
|
||||||
|
@ -211,39 +191,6 @@
|
||||||
revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
|
revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
|
||||||
version = "v0.8.0"
|
version = "v0.8.0"
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
name = "github.com/prometheus/client_golang"
|
|
||||||
packages = ["prometheus"]
|
|
||||||
revision = "c5b7fccd204277076155f10851dad72b76a49317"
|
|
||||||
version = "v0.8.0"
|
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
name = "github.com/prometheus/client_model"
|
|
||||||
packages = ["go"]
|
|
||||||
revision = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"
|
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
name = "github.com/prometheus/common"
|
|
||||||
packages = [
|
|
||||||
"expfmt",
|
|
||||||
"internal/bitbucket.org/ww/goautoneg",
|
|
||||||
"model"
|
|
||||||
]
|
|
||||||
revision = "e4aa40a9169a88835b849a6efb71e05dc04b88f0"
|
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
name = "github.com/prometheus/procfs"
|
|
||||||
packages = [
|
|
||||||
".",
|
|
||||||
"internal/util",
|
|
||||||
"nfs",
|
|
||||||
"xfs"
|
|
||||||
]
|
|
||||||
revision = "780932d4fbbe0e69b84c34c20f5c8d0981e109ea"
|
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
name = "github.com/satori/go.uuid"
|
name = "github.com/satori/go.uuid"
|
||||||
packages = ["."]
|
packages = ["."]
|
||||||
|
@ -311,6 +258,6 @@
|
||||||
[solve-meta]
|
[solve-meta]
|
||||||
analyzer-name = "dep"
|
analyzer-name = "dep"
|
||||||
analyzer-version = 1
|
analyzer-version = 1
|
||||||
inputs-digest = "177aad722546727b812f2baf43e2fcc614cc1fa209efa3fdffa4dbcafb6dfdad"
|
inputs-digest = "d50a9a3e46034310699abad51d2d8572c09640074aeda4e8e35149c72e78b582"
|
||||||
solver-name = "gps-cdcl"
|
solver-name = "gps-cdcl"
|
||||||
solver-version = 1
|
solver-version = 1
|
||||||
|
|
|
@ -72,10 +72,6 @@ required = ["github.com/kevinburke/go-bindata","github.com/gogo/protobuf/proto",
|
||||||
name = "github.com/influxdata/influxdb"
|
name = "github.com/influxdata/influxdb"
|
||||||
version = "~1.1.0"
|
version = "~1.1.0"
|
||||||
|
|
||||||
[[constraint]]
|
|
||||||
name = "github.com/influxdata/ifql"
|
|
||||||
revision = "9445c4494d4421db2ab1aaaf6f4069446f11752e"
|
|
||||||
|
|
||||||
[[constraint]]
|
[[constraint]]
|
||||||
name = "github.com/influxdata/kapacitor"
|
name = "github.com/influxdata/kapacitor"
|
||||||
revision = "4f10efc41b4dcac070495cf95ba2c41cfcc2aa3a"
|
revision = "4f10efc41b4dcac070495cf95ba2c41cfcc2aa3a"
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/bouk/httprouter"
|
"github.com/bouk/httprouter"
|
||||||
"github.com/influxdata/ifql"
|
"github.com/influxdata/platform/query/builtin"
|
||||||
"github.com/influxdata/ifql/parser"
|
"github.com/influxdata/platform/query/parser"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Params map[string]string
|
type Params map[string]string
|
||||||
|
@ -47,7 +47,7 @@ func (s *Service) IFQL(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
// IFQLSuggestions returns a list of available IFQL functions for the IFQL Builder
|
// IFQLSuggestions returns a list of available IFQL functions for the IFQL Builder
|
||||||
func (s *Service) IFQLSuggestions(w http.ResponseWriter, r *http.Request) {
|
func (s *Service) IFQLSuggestions(w http.ResponseWriter, r *http.Request) {
|
||||||
completer := ifql.DefaultCompleter()
|
completer := query.DefaultCompleter()
|
||||||
names := completer.FunctionNames()
|
names := completer.FunctionNames()
|
||||||
var functions []SuggestionResponse
|
var functions []SuggestionResponse
|
||||||
for _, name := range names {
|
for _, name := range names {
|
||||||
|
@ -80,7 +80,7 @@ func (s *Service) IFQLSuggestions(w http.ResponseWriter, r *http.Request) {
|
||||||
func (s *Service) IFQLSuggestion(w http.ResponseWriter, r *http.Request) {
|
func (s *Service) IFQLSuggestion(w http.ResponseWriter, r *http.Request) {
|
||||||
ctx := r.Context()
|
ctx := r.Context()
|
||||||
name := httprouter.GetParamFromContext(ctx, "name")
|
name := httprouter.GetParamFromContext(ctx, "name")
|
||||||
completer := ifql.DefaultCompleter()
|
completer := query.DefaultCompleter()
|
||||||
|
|
||||||
suggestion, err := completer.FunctionSuggestion(name)
|
suggestion, err := completer.FunctionSuggestion(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue