Improve behaviour when stacking field on quick values fails
#4289

Comments

Stacking fields on quick values is not supported in ES 2, but there is no easy way of disabling the controls in that case. When trying to stack a field in ES 2, we end up with the quick values component stuck in a loading state and an error notification showing up, which is quite confusing.

Expected Behavior

Capture errors when stacking fields in quick values and show an error message in the div. At least we should update the component state, to avoid that it keeps on that loading state.

Current Behavior

The component stays in a broken state until the configuration changes or the quick values analyzer is dismissed and added again.

Steps to Reproduce (for bugs)

Use ES 2

Calculate quick values for a field

Stack another field in the quick values configuration

See the component spin until the configuration changes or quick values are dismissed

* Add elasticsearch version to cluster stats
* Reset to default options when analyzing a new message field
* Disable loading state in case of an error
If the QuickValues HTTP request fails, reset the loading state so the
user is able to change settings and try again.
Fixes#4289
* Disable stacked fields feature when running with ES < 5

* Add elasticsearch version to cluster stats
* Reset to default options when analyzing a new message field
* Disable loading state in case of an error
If the QuickValues HTTP request fails, reset the loading state so the
user is able to change settings and try again.
Fixes#4289
* Disable stacked fields feature when running with ES < 5
(cherry picked from commit 4775212)