If the error returned was normal text instead of JSON, the JSON parsing
would fail and the JSON error would be returned instead of the actual
error.
This has been modified so that when it fails to parse the text as JSON,
it will construct an error with the actual text and then wrap it using
the JSON error.
The method we used to compute a single stat / gauge value previously did
account for missing data. If the latest value in a response was part of
a numeric column but was null/NaN/not defined, the single stat
computation would fail and a user would see an error message "Could not
display single stat because your values are non-numeric".
This commit updates the single stat computation to find the latest
*defined* numeric values.
If no latest valid numeric values are found, we will either:
- Display an error message if using the compuation within a single stat
visualization
- Display nothing if using the computation within a within a line +
single stat visualization (i.e. display the line vis only)
If multiple latest values are found, we make an arbitrary selection
(same as previous behavior). The goal is to eventually expose UI
elements to the user so they can make this selection themselves.
This commit also updates the single stat computation to use the
@influxdata/vis `Table` format as an intermediate/parsed representation
of a Flux CSV response. This unlocks the possibility for performance
gains in our CSV parsing. See #13852.
Closes#13824
The `databases()` function was moved into the `influxdata/influxdb/v1`
package and so it wouldn't work anymore. The `percentile()` call was
changed to `quantile()` and the argument was changed to `q`. This also
updates `median()` to use `median()` since we now produce AST's and not
the spec so we can use the `median()` definition instead.
* Remove local input and textarea, update references
* Delete local Label component and update references
* Delete local DraggableResizer and update references
* Delete local Overlay components and update references
* Remove all imports of modules into individual stylesheets
* Ensure all stylesheets are imported somewhere
* Remove style imports from component files
* Add optional multiselect styling to query builder lists
* Style buckets list to be single select
* Style function list to be multi-select
* Style tag selector to be multi-select
* Updoot
* Appease the linter gods
* Fix scrollbars in selector list
* Make variables toggle button themed to match variables
* Make dropdowns only be draggable from the hamburger
* Polish styles of variable dropdown
* Updoot