- This adds more thorough error handling to retrieving annotations from the server to avoid breaking Anomaly Explorer when there's a problem retrieving annotations. The UI will silently fail and hide the annotations table if for whatever reasons annotations cannot be retrieved for the selected jobs (this could be permissions or setup related if e.g. the annotations feature index/aliases are not present). This is now the same behavior like in Single Metric Viewer. The browser console will still output an error message. This fixes an error scenario where Anomaly Explorer would fail to load if a user upgraded to 6.6 because the backend task wasn't run yet to create the annotation index/aliases.
- Disables annotations feature in Single Metric Viewer if annotations fail to load.
- Use componentDidUpdate and an update check instead of deprecated componentWillUpdate for updating the annotations table in jobs management.
The previous default was an empty string, but empty strings are not valid in the expression. The code ends up using "left" or "top" (depending on the axis), so defaulting to either isn't really a change.
This fixes the following valid expression:
```
demodata | pointseries x=@timestamp y="mean(price)" | plot yaxis={axisConfig max=120}
```
Previously this would fail because the `position` default is invalid unless you specified a value.
<img width="617" alt="screenshot 2019-03-01 12 11 47" src="https://user-images.githubusercontent.com/404731/53660475-33104a80-3c1b-11e9-9a4c-a93116598e28.png">
Now it works as expected:
<img width="536" alt="screenshot 2019-03-01 12 11 03" src="https://user-images.githubusercontent.com/404731/53660440-212ea780-3c1b-11e9-8f4f-7d83a1009fd0.png">
* Reduces `shard_size` for the `sampler` aggregation from `50000` to `20000`.
* Sets `precision_threshold` for `cardinality` aggregations to `100`.
* Fixes a bug where `distinct_count` was used instead of `cardinality` for the check whether to apply normalizaton.
* Fixes normalization for `7.x` and above by adding `rest_total_hits_as_int: true`.
* Tweaks the text for chart's info tooltip.
* Use 's' instead of 'm' to match newlines instead of doing multi-line
* Fix autocomplete suggestions to handle newlines and tabs in field names
* Add line feed to escaped whitespace
This adds tests to `server/models/annotation_service`. The tests include a check if the `.key` attribute of an annotation is properly removed from an annotation before indexing it.
The UI adds a `key` attribute to annotation objects to store the letter used for labels in the chart and tables. When editing and saving an annotation that `key` could end up being saved to the annotations index. This isn't necesseary since the `key` attribute is just a dynamic label used within the UI. This fixes it by deleting an eventual `key` attribute from the annotations object before saving it to the index.
With security enabled, the internal user wouldn't have enough permissions to run the integrity check. This changes the check to use the currently logged in user. Also fixes some typos in messages.
* [deprecations] convert flattened settings to nested settings
* [deprecations] reuse rename method for elasticsearch.url to elasticsearch.hosts
* newline
* add known issues to docs
* [APM] fixes#29564 by bailing out of recursion when a multiple references of the same object are detected
* [APM] minimized test fixure to isolate logic being tested
* [APM] improve readabilty by using better var name