-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mappings editor] Add code improvements for source field #201188
[Mappings editor] Add code improvements for source field #201188
Conversation
Pinging @elastic/kibana-management (Team:Kibana Management) |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
cc @ElenaStoeva |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for addressing these, changes lgtm! 🚀
Starting backport for target branches: 8.17, 8.x |
) Closes elastic#200769 ## Summary This PR is a follow-up to elastic#199854 and it adds the following code improvements: - Replaces Mappings-editor-context-level property `hasEnterpriceLicense` with plugin-context-level `canUseSyntheticSource` property - Adds jest tests to check if the synthetic option is correctly displayed based on license - Improves readability of serializer logic for the source field **How to test:** The same test instructions from elastic#199854 can be followed with a focus on checking that the synthetic option is only available in Enterprise license. (cherry picked from commit 762bb7f)
) Closes elastic#200769 ## Summary This PR is a follow-up to elastic#199854 and it adds the following code improvements: - Replaces Mappings-editor-context-level property `hasEnterpriceLicense` with plugin-context-level `canUseSyntheticSource` property - Adds jest tests to check if the synthetic option is correctly displayed based on license - Improves readability of serializer logic for the source field **How to test:** The same test instructions from elastic#199854 can be followed with a focus on checking that the synthetic option is only available in Enterprise license. (cherry picked from commit 762bb7f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…) (#201577) # Backport This will backport the following commits from `main` to `8.x`: - [[Mappings editor] Add code improvements for source field (#201188)](#201188) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Elena Stoeva","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-25T12:46:05Z","message":"[Mappings editor] Add code improvements for source field (#201188)\n\nCloses https://github.com/elastic/kibana/issues/200769\r\n\r\n## Summary\r\n\r\nThis PR is a follow-up to https://github.com/elastic/kibana/pull/199854\r\nand it adds the following code improvements:\r\n\r\n- Replaces Mappings-editor-context-level property `hasEnterpriceLicense`\r\nwith plugin-context-level `canUseSyntheticSource` property\r\n- Adds jest tests to check if the synthetic option is correctly\r\ndisplayed based on license\r\n- Improves readability of serializer logic for the source field\r\n\r\n\r\n**How to test:**\r\nThe same test instructions from\r\nhttps://github.com//pull/199854 can be followed with a\r\nfocus on checking that the synthetic option is only available in\r\nEnterprise license.","sha":"762bb7f59d1d980aa34358c62ae0ef53e81f726e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Kibana Management","release_note:skip","Feature:Mappings Editor","v9.0.0","backport:prev-minor","v8.17.0","v8.18.0"],"title":"[Mappings editor] Add code improvements for source field","number":201188,"url":"https://github.com/elastic/kibana/pull/201188","mergeCommit":{"message":"[Mappings editor] Add code improvements for source field (#201188)\n\nCloses https://github.com/elastic/kibana/issues/200769\r\n\r\n## Summary\r\n\r\nThis PR is a follow-up to https://github.com/elastic/kibana/pull/199854\r\nand it adds the following code improvements:\r\n\r\n- Replaces Mappings-editor-context-level property `hasEnterpriceLicense`\r\nwith plugin-context-level `canUseSyntheticSource` property\r\n- Adds jest tests to check if the synthetic option is correctly\r\ndisplayed based on license\r\n- Improves readability of serializer logic for the source field\r\n\r\n\r\n**How to test:**\r\nThe same test instructions from\r\nhttps://github.com//pull/199854 can be followed with a\r\nfocus on checking that the synthetic option is only available in\r\nEnterprise license.","sha":"762bb7f59d1d980aa34358c62ae0ef53e81f726e"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201188","number":201188,"mergeCommit":{"message":"[Mappings editor] Add code improvements for source field (#201188)\n\nCloses https://github.com/elastic/kibana/issues/200769\r\n\r\n## Summary\r\n\r\nThis PR is a follow-up to https://github.com/elastic/kibana/pull/199854\r\nand it adds the following code improvements:\r\n\r\n- Replaces Mappings-editor-context-level property `hasEnterpriceLicense`\r\nwith plugin-context-level `canUseSyntheticSource` property\r\n- Adds jest tests to check if the synthetic option is correctly\r\ndisplayed based on license\r\n- Improves readability of serializer logic for the source field\r\n\r\n\r\n**How to test:**\r\nThe same test instructions from\r\nhttps://github.com//pull/199854 can be followed with a\r\nfocus on checking that the synthetic option is only available in\r\nEnterprise license.","sha":"762bb7f59d1d980aa34358c62ae0ef53e81f726e"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Elena Stoeva <[email protected]>
) (#201576) # Backport This will backport the following commits from `main` to `8.17`: - [[Mappings editor] Add code improvements for source field (#201188)](#201188) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Elena Stoeva","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-25T12:46:05Z","message":"[Mappings editor] Add code improvements for source field (#201188)\n\nCloses https://github.com/elastic/kibana/issues/200769\r\n\r\n## Summary\r\n\r\nThis PR is a follow-up to https://github.com/elastic/kibana/pull/199854\r\nand it adds the following code improvements:\r\n\r\n- Replaces Mappings-editor-context-level property `hasEnterpriceLicense`\r\nwith plugin-context-level `canUseSyntheticSource` property\r\n- Adds jest tests to check if the synthetic option is correctly\r\ndisplayed based on license\r\n- Improves readability of serializer logic for the source field\r\n\r\n\r\n**How to test:**\r\nThe same test instructions from\r\nhttps://github.com//pull/199854 can be followed with a\r\nfocus on checking that the synthetic option is only available in\r\nEnterprise license.","sha":"762bb7f59d1d980aa34358c62ae0ef53e81f726e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Kibana Management","release_note:skip","Feature:Mappings Editor","v9.0.0","backport:prev-minor","v8.17.0","v8.18.0"],"title":"[Mappings editor] Add code improvements for source field","number":201188,"url":"https://github.com/elastic/kibana/pull/201188","mergeCommit":{"message":"[Mappings editor] Add code improvements for source field (#201188)\n\nCloses https://github.com/elastic/kibana/issues/200769\r\n\r\n## Summary\r\n\r\nThis PR is a follow-up to https://github.com/elastic/kibana/pull/199854\r\nand it adds the following code improvements:\r\n\r\n- Replaces Mappings-editor-context-level property `hasEnterpriceLicense`\r\nwith plugin-context-level `canUseSyntheticSource` property\r\n- Adds jest tests to check if the synthetic option is correctly\r\ndisplayed based on license\r\n- Improves readability of serializer logic for the source field\r\n\r\n\r\n**How to test:**\r\nThe same test instructions from\r\nhttps://github.com//pull/199854 can be followed with a\r\nfocus on checking that the synthetic option is only available in\r\nEnterprise license.","sha":"762bb7f59d1d980aa34358c62ae0ef53e81f726e"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201188","number":201188,"mergeCommit":{"message":"[Mappings editor] Add code improvements for source field (#201188)\n\nCloses https://github.com/elastic/kibana/issues/200769\r\n\r\n## Summary\r\n\r\nThis PR is a follow-up to https://github.com/elastic/kibana/pull/199854\r\nand it adds the following code improvements:\r\n\r\n- Replaces Mappings-editor-context-level property `hasEnterpriceLicense`\r\nwith plugin-context-level `canUseSyntheticSource` property\r\n- Adds jest tests to check if the synthetic option is correctly\r\ndisplayed based on license\r\n- Improves readability of serializer logic for the source field\r\n\r\n\r\n**How to test:**\r\nThe same test instructions from\r\nhttps://github.com//pull/199854 can be followed with a\r\nfocus on checking that the synthetic option is only available in\r\nEnterprise license.","sha":"762bb7f59d1d980aa34358c62ae0ef53e81f726e"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Elena Stoeva <[email protected]>
) Closes elastic#200769 ## Summary This PR is a follow-up to elastic#199854 and it adds the following code improvements: - Replaces Mappings-editor-context-level property `hasEnterpriceLicense` with plugin-context-level `canUseSyntheticSource` property - Adds jest tests to check if the synthetic option is correctly displayed based on license - Improves readability of serializer logic for the source field **How to test:** The same test instructions from elastic#199854 can be followed with a focus on checking that the synthetic option is only available in Enterprise license.
) Closes elastic#200769 ## Summary This PR is a follow-up to elastic#199854 and it adds the following code improvements: - Replaces Mappings-editor-context-level property `hasEnterpriceLicense` with plugin-context-level `canUseSyntheticSource` property - Adds jest tests to check if the synthetic option is correctly displayed based on license - Improves readability of serializer logic for the source field **How to test:** The same test instructions from elastic#199854 can be followed with a focus on checking that the synthetic option is only available in Enterprise license.
Closes #200769
Summary
This PR is a follow-up to #199854 and it adds the following code improvements:
hasEnterpriceLicense
with plugin-context-levelcanUseSyntheticSource
propertyHow to test:
The same test instructions from #199854 can be followed with a focus on checking that the synthetic option is only available in Enterprise license.