Skip to content
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

[ILM] Prettify JSON in "Show request" flyout #87612

Merged
merged 2 commits into from
Jan 11, 2021

Conversation

jloleysens
Copy link
Contributor

Summary

In the JS spec an object {} contains unordered keys (i.e., the order of the keys should not be relied upon) - see this StackOverflow post that references the ECMAScript spec.

However, "normal" keys are generally ordered by insertion order. This PR adds a prettify step to the JSON that is displayed in the flyout to order phases in the policy payload by phase order rather than the order in which the object is assembled in the form lib.

Unordered, pre this PR (hot, delete, cold warm)

Screenshot 2021-01-07 at 10 38 40

Ordered, after the changes are applied (hot, warm, cold, delete)

Screenshot 2021-01-07 at 10 38 15

Notes

This does not order the actions in phases, but ordering the phases is at least a large improvement.

@jloleysens jloleysens added chore Feature:ILM Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes labels Jan 7, 2021
@jloleysens jloleysens requested a review from a team as a code owner January 7, 2021 10:42
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing on this @jloleysens ! changes LGTM and confirmed the fix locally as well 👍

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
indexLifecycleManagement 250.2KB 251.6KB +1.4KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@jloleysens jloleysens merged commit 8a21b64 into elastic:master Jan 11, 2021
@jloleysens jloleysens deleted the ilm/prettify-request-json branch January 11, 2021 12:26
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jan 11, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jan 11, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
jloleysens added a commit that referenced this pull request Jan 11, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
jloleysens added a commit that referenced this pull request Jan 11, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Feature:ILM release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.11.0 v7.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants