When App state is read from the url, it is accessed via
`$location.search()`. It turns out that the result of
`$location.search()` is a mutable object that allows you to modify the
results of `$location.search()` without actually modifying the URL. When
a user clicks a field in the Discover sidebar, it executes the scope
method `vizLocation` to get the href value for the "Visualize" button.
As an unintended side effect, `vizLocation` was modifying the object
returned from `$location.search()`. This change would ultimately be read
when the Visualize app loaded instead of the param in the actual URL
since there's no full page load from Discover -> Visualize.
To make things more complicated, I believe there was a race condition
partially masking this issue. Since `vizLocation` is used in an Angular
string template, the data binding causes it to execute on every digest
cycle. This is why the incorrect value continued to be written to
`$location.search()` even after `visLocation` ran for the correct field.
It also meant that the result of `$location.search()` was totally
dependent on which field `vizLocation` ran for most recently before the
user clicked Visualize.
Fixes https://github.com/elastic/kibana/issues/8718
they come back from the server as ‘true’ currently. Hopefully that
will be fixed in the future, so to future-proof this I am only
converting when the value is not of type boolean.
Fixes#8677
Need to convert both number and bool strings to their respective types.
Throw an error for unexpected types/values.
Since forever, the vislib has been compensating for a behavior/bug in the agg_response module where "series" labels were not assigned to points if there wasn't a "series" aggregation or multiple y-axis. To compensate for this, the vislib was assigning the yAxisLabel to the series, which had the same effect, but now that the legend is rendered in it's own tick, followed by the visualization, and that behavior was being executed during the vislib render, the legend has been flashing an empty row for a while (this was worsened by the fact that vislib rendering did not trigger a digest cycle).
These changes remove the workaround code from the vislib, and update the agg_response to always send the y-axis label as the series label when there is no series aggregation. Behavior with multiple-y-axis and multiple series aggs should be preserved.
Need to use params.value instead of value.
Fixes#8404
Add params prefix in another spot for painless scripted fields
Fix date histogram with scripted fields
Remove format: epoch_millis so the script compiles. I am not 100%
confident of the side affect from this (it’s used for non-scripted
fields, but I’m not sure where I would put it for scripted fields, or
if it’s needed). At any rate, it appears that formatting settings for
scripted fields is still being honored, even after removing it from
params.
Any `sleep()` calls preceding a `verifyChartData()` call seem to be
redundant, because `verifyChartData()` already uses `try()` to avoid
flakyness due to timing.
A few more assertions are now wrapped in `try()` calls to avoid
occasional failures due to the timing of rendering.
Fixes#7661
Feedback in review as follows:
For such a large section, I think just displaying a warning icon near the top
of the section would be fine instead of wrapping the entire block in an alert
class.
Fixes#7661
Feedback from review is that it would be better to display a list of indices
for each field type as would be easier to distinguish the outliers in this
case.
Fixes#7661
Moved content to the edit field page from the tooltip for better scalability when large data.
The conflict description data is now only stored for conflicting fields.