Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mappings editor] Handle unsupported types (elastic#198185)
Fixes elastic#197592 ## Summary This PR fixes the bug where the index Mappings details page crashes if the index has a mapping field with a type that is not recognized in Kibana. We fix this by using `getTypeLabelFromField` instead of directly fetching the `label` property of an object that might be `undefined` - `getTypeLabelFromField` takes care of this case. **How to test:** 1. Create the following index in Console (it has the unsupported `counted_keyword` field type): ``` PUT test { "mappings": { "properties": { "@timestamp": { "type": "date" }, "log": { "type": "text" }, "ids": { "type": "counted_keyword" } } } } ``` 2. Go to Index Management and click on the index that we just created 3. Go to Mappings tab 4. Verify that the page loads correctly 5. Check that the opening filter and selecting an option doesn't make the page crash. https://github.com/user-attachments/assets/4a595968-7cd8-4d36-9a53-264a0d5db50f (cherry picked from commit 3c5319f)
- Loading branch information