Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Stack Monitoring] Convert node roles into array (elastic#167628)
## π Summary When the `elasticsearch.node.roles` property is set to a single role, the API returns a single string instead of a list, failing when computing the role list client side and resulting in an empty list. This fix is to parse the node roles into a list if the API returns a single role string and correctly displays the roles. E.g. Assuming we have the following roles configuration ``` [ { "_source": { "elasticsearch": { "node": { "roles": [ "data", "master" ] } } } }, { "_source": { "elasticsearch": { "node": { "roles": "master" } } } } ] ``` It would fail at parsing the second node roles and fall back into the "coordinating only" default. <img width="814" alt="Screenshot 2023-09-29 at 13 05 14" src="https://github.com/elastic/kibana/assets/34506779/bf49a974-650a-44cc-827b-b3dc834d6cee"> Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co> (cherry picked from commit a69957e)
- Loading branch information