Moves the handwritten AST wrapper types from influxdb-client-js back
into the UI. Long term I think we should improve the `swagger.yml` spec
for these types so that we can use their generated counterparts. This
will take some tedious labor and a review from the Flux team.
Part of #14482
When a user saves a query from the DE as a task, we display an overlay
that allows them to select the token they use for the task. Since not
all tokens have access to the buckets read from and written to in the
query, we filter the list of tokens that are selectable in the overlay.
This commit:
- Improves the detection of what buckets are read from in the query by
using an AST based approach to analyzing the query, rather than some
stringy heuristics
- Removes the assumption that only a single bucket is read from in the
query
Closes#14226
The `exists` operator now gets pushed down to storage correctly. If
`exists` is used on a tag, then it will be rewritten to `tag != ""`
which is how storage defines if a tag exists. If `not exists` is used,
then it will use `tag == ""` which is how you would query storage for
only if a tag doesn't exist.
The `tag == ""` and `tag != ""` are different. For `tag == ""`, the
predicate is impossible for the storage layer to return true with.
Ideally, we would just rewrite this to return nothing and we wouldn't
bother with even querying storage. Instead, we just do not rewrite this
predicate because it cannot be rewritten to make sense with storage. If
we see `tag != ""`, it is the only one that can be passed through as-is
because `tag != ""` returns the same values as `exists tag`. It will
return true for every non-null value.
Previously, opening the VEO for a cell on a dashboard would cause the
view for the cell on the dashboard to reload. In turn, this would cause
the dashboard cell to crash.
This commit updates the logic for opening the VEO so that the view is
only reloaded when necessary.
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Chris Henn <chris@chrishenn.net>
* chore(ui): change notification rule to rule
* chore(ui/alerts/actions): change from notificationRule to rule
* feat flag
* fix: component name
* fix: no console.log
* Define new check, edit check and check view routes with VEO
Co-authored-by: Michael Desa <mjdesa@gmail.com>
* Add task status to other task types
* Put editAlerting route behind feature flag
* add action and reducer for update current check
* Add init edit and new check editor overlay
* Split VEO in to two for new and edit view
* get edit and new CheckEO's ready
* Create getViewForTimeMachine action
* current check should be a partial check
* Fix view typing
* Fix linter errors
* Fix equality
* Catch save VEO errors
* refactor(resource-list): replace local labels resource list with Clockface resource list
* refactor(resource-list): replace local variables resource list with Clockface resource list
* refactor(resource-list): replace local collectors resource list with Clockface resource list
* refactor(resource-list): replace local scrapers resource list with Clockface resource list
* refactor(resource-list): replace local templates resource list with Clockface resource list
* refactor(resource-list): replace local static templates resource list with Clockface resource list
* refactor(resource-list): replace local members resource list with Clockface resource list
* refactor(resource-list): replace local buckets resource list with Clockface resource list
* refactor(resource-list): replace local tasks resource list with Clockface resource list
* refactor(resource-list): replace local dashboards resource list with Clockface resource list
* refactor(resource-list): replace local notification rule & check resource lists with Clockface resource lists
* Delete local resource list components
* test: update affected snapshot tests
* test(e2e): fix labels integration tests
* refactor: use router.push() instead of window.location.assign()
If client requests with Accept-Encoding: gzip, then
compress response and return with Content-Encoding: gzip.
This increases the server-side load by about 12%, but saves network bandwidth.
benchmark old ns/op new ns/op delta
Benchmark_Query_no_gzip-4 123609 137885 +11.55%
benchmark old allocs new allocs delta
Benchmark_Query_no_gzip-4 149 150 +0.67%
benchmark old bytes new bytes delta
Benchmark_Query_no_gzip-4 14297 15205 +6.35%
* refactor(clockface): replace index lists with clockface index lists
* refactor(clockface): replace local index list import with clockface index list import
* refactor(clockface): remove local index list components
* build(ui): add ability to bundle wasm
* refactor(ui/ast): remove cruft from async AST calls
* chore: add TODO
* test: mock @influxdata/flux-parser package
* oops: I will not hide my shame