-
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
[Snapshot & Restore] fix pre existing policy with no existing repository #76861
[Snapshot & Restore] fix pre existing policy with no existing repository #76861
Conversation
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
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.
Hi @jloleysens,
I tested your changes locally and the fix works!
I was just wondering if it would be possible to make the step invalid when a pre-selected repo was deleted? Since we are setting the value of the select to an empty string, I think the Next button should be disabled. Currently, the form can still progress to "Snapshot settings" step with an empty select, which is not possible when the from first loads (for a new policy).
Also, personally I would prefer having this callout and "no repositories" section similar to each other, maybe make this callout to be of type "danger" or use `SectionError' without the button.
What do you think?
<> | ||
{!policyRepositoryExists && ( | ||
<> | ||
<EuiCallOut |
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.
A screenshot would be 💣 !
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.
👍
@jloleysens Great job spotting and fixing this! Is this fixing a bug from a prior release? If so, can we add the |
@yuliacech @cjcenizal Thanks both for the review! @yuliacech great catch regarding the form not blocking. After your comment about making the callout "danger" I also revised the copy a bit to also mention the currently configured repository and state that that does not exist. Would you mind taking another look? |
@elasticmachine merge upstream |
…' of github.com:jloleysens/kibana into ilm/fix/pre-existing-policy-with-no-existing-repository * 'ilm/fix/pre-existing-policy-with-no-existing-repository' of github.com:jloleysens/kibana: fix empty string in selected indices (elastic#76855) [Security Solution] Refactor OverviewHost and OverviewNetwork to use Search Strategy (elastic#76409) Use Search API in Timelion (sync) (elastic#75115) [telemetry] expose getIsOptedIn function in plugin start contract (elastic#75143) [ILM] Clean up remaining js files and any typings (elastic#76803) [Logs UI] Shared `<LogStream />` component (elastic#76262) [Security Solution] Add unit test for all hosts (elastic#76752) [Security Solution] Add unit test for authentications search strategy (elastic#76665) Do not apply search source data for tsvb (elastic#75137) [Security Solution] Refactor NetworkDns to use Search Strategy (elastic#76250) [SECURITY SOLUTION] Adds 'cypress:open-as-ci' command (elastic#76125) [Logs UI] Update alert executor tests (elastic#75764) [Functional] Unskip vega tests and fix flakiness (elastic#76600) [Data] Query String Input accepts classname prop (elastic#76848) [ML] Swim lane pagination for viewing by job id (elastic#76847) [Security Solution] Refactor MatrixHistogram to use Search Strategy (elastic#76603) [APM] Use the outcome field to calculate the transaction error rate chart (elastic#75528) [APM] Use observer.hostname instead of observer.name (elastic#76074) Legacy logging: fix remoteAddress being duplicated in userAgent field (elastic#76751)
@jloleysens I noticed a couple accessibility issues with this change:
My suggestion is to move the callout outside of the field/label area and use the |
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.
Hi @jloleysens,
thanks for fixing the form validation issue! Tested locally and the Next button is now disabled should the repo have been deleted in between. Apart from accessibility issues @cjcenizal mentioned, I'm good with merging this.
…ory (elastic#76861) * implement fix and add callout with copy * added test * make callout a danger callout and revise copy * block the form if we have a repo, but it does not exist * added test to assert that form wizard blocks on validation for not found repo * fix types and add a doc comment * move callout to above the form Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…ory (elastic#76861) * implement fix and add callout with copy * added test * make callout a danger callout and revise copy * block the form if we have a repo, but it does not exist * added test to assert that form wizard blocks on validation for not found repo * fix types and add a doc comment * move callout to above the form Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
💚 Build SucceededBuild metricsasync chunks size
History
To update your PR or re-run it, just comment with: |
…ory (#76861) (#77050) * implement fix and add callout with copy * added test * make callout a danger callout and revise copy * block the form if we have a repo, but it does not exist * added test to assert that form wizard blocks on validation for not found repo * fix types and add a doc comment * move callout to above the form Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…ory (#76861) (#77051) * implement fix and add callout with copy * added test * make callout a danger callout and revise copy * block the form if we have a repo, but it does not exist * added test to assert that form wizard blocks on validation for not found repo * fix types and add a doc comment * move callout to above the form Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* master: (68 commits) a11y tests on spaces home page including feature control (elastic#76515) [ML] Transforms list: persist pagination through refresh interval (elastic#76786) [ML] Replace all use of date_histogram interval with fixed_interval (elastic#76876) [Timelion] Update timelion deprecation links (elastic#77008) [Security Solution] Refactor Network Details to use Search Strategy (elastic#76928) Upgrade elastic charts to 21.1.2 (elastic#76939) [Alerting][Connectors] Refactor Jira: Generic Implementation (phase one) (elastic#73778) [Snapshot & Restore] fix pre existing policy with no existing repository (elastic#76861) Update saved object management UI text (elastic#76826) [Form lib] Add validations prop to UseArray and expose "moveItem" handler (elastic#76949) [Logs UI] Use fields api in log stream (elastic#76919) [UI Metrics] Support multi-colon keys (elastic#76913) [APM] Script for creating functional test archive (elastic#76926) [ENDPOINT] First version of the trusted apps list. (elastic#76304) Correct field for rum page url (elastic#76916) [Security Solution] Fix redirect properly old SIEM App routes (elastic#76868) Bump http-proxy from 1.17.0 to 1.18.1 (elastic#76924) [RUM Dashboard] Visitor breakdown usability (elastic#76834) [Search] Add a new advanced setting searchTimeout (elastic#75728) [DOCS] Adds timelion deprecation to new visualize docs structure (elastic#76959) ...
Summary
Fix an issue where the snapshot and restore policy creation wizard does not allow you to select a different repo when the pre-existing repo for the policy was deleted - also inform the user of when this has happened.
There is an edge case where a user can be blocked if they only have one other policy to select from; the form will not allow the user to select another repo in this case.
Screenshot
Checklist
Delete any items that are not applicable to this PR.
Release note
The snapshot and restore wizard will now notify a user when a policy configured with a non-existing repository is being updated and require that the user select a new repository.