-
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
[UA] Change default reindex flyout action based on index size #215302
[UA] Change default reindex flyout action based on index size #215302
Conversation
💔 Build Failed
Failed CI StepsHistory
cc @sabarasaba |
Pinging @elastic/kibana-management (Team:Kibana Management) |
@elasticmachine merge upstream |
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.
lgtm :), thank you @sabarasaba
(just a nit)
@@ -96,6 +97,13 @@ export const ReindexDetailsFlyoutStep: React.FunctionComponent<{ | |||
showDefaultGuidance = true; | |||
} | |||
|
|||
// Determine if the index is larger than 1GB | |||
const isLargeIndex = indexSizeInBytes > 1073741824; |
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.
Nit: for readability reasons, I would add 1073741824
to a constant to be able to compare const isLargeIndex = indexSizeInBytes > ONE_GB;
In any case, with the comment it is also clear.
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.
The thing is that if that value changes later we also need to rename the const. I think I'll leave as is for now 😅
Closes: #211730
Summary
This PR changes the default action for reindexing (mark as read only and reindex) based on the size of the index. When it's larger than 1gb we recommend marking as read only, otherwise reindex.
NOTE: I've also added a recommended badge that is shown on either
reindex
ormark as read only
based on the index size.NOTE: This PR also changes the color of secondary action for the reindexing flyout. Where it used to be red (signaling some sort of danger) and now its been made into a lighter blue:
// before


// after
Screenshots
// Also for datastreams actions we change the CTA color from red to light blue
