forked from yugabyte/yugabyte-db
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAT-5661][PLAT-5820] Add non-blocking validation and harden the cre…
…ate xCluster config form Summary: This diff contains two changes: 1. Add non-blocking form validation as a warning message. 2. Reset table selection when changing target universe in create xCluster config form Add non-blocking form validation as a warning message ----------------------------------------------------- **Context** Formik validation lets us set errors which block the user from submitting. There are some checks (ex. disk space) where we validate against a recommendation rather than a requirement. This diff adds a way to pass non-blocking warnings to the various form steps. **Changes** - Add form warnings. - Store `isTableSelectionValidated` status in CreateConfigModal state instead of using a separte step. - Removed `Enabled Replication` step. Form will use `isTableSelectionValidated` to decide submit label and action. Reset table selection when changing target universe in create xCluster config form ------------------------------------------------------ **Context** Consider the following case: 1) User chooses a target universe for the xCluster config -> proceeds to next page 2) User selects some tables (table eligibility is based on the target universe selection from the previous page) 3) User changes their mind and wants to select a different target universe -> proceeds to previous page (select target universe) 4) User changes target universe selection 5) User submits the form step (clicks next). We should reset the table/keyspace selection since some of the selected items may not be ineligible for selection. **Changes** - Reset table selection only if user submits the 'select target universe' form step with a different target universe. We do not reset the table/keyspace selection if the user changes target universe selection (step #4) and then changes back to the previous value (from step #1). This is to give some tolerance for user error. Suppose the user misclicks and changes the target universe after spending a lot of time selecting their tables, they would need to reselect every table again with no easy ‘undo’. Test Plan: Non-blocking warning - Create xCluster config with a universe that does not have enough free disk space (< 100GB) and requires bootstrapping. - Verify that a non-blocking warning message will show to let the user know about our 100GB free disk space recommendation. - Verify that the user is free to ignore this warning by proceeding straight to the bootstrapping step. Reset table selection - Ensure you have at least 3 universes. - Choose any one of the universes to create an xCluster config from. Call this Universe1 - Select any universe to be the target universe. Call this Universe2. Click next. - Select 1+ tables. - Go back to the 'Select target universe' step. - Change the target universe to something else. Call this Universe3. - Change the target universe from Universe3 back to Universe2 before clicking next. - Verify that the table selection has not changed. - Go back to the 'Select target universe' step - Change the target universe to something else (can be anything other than Universe2). Click next - Verify that table selection is now empty. Reviewers: hzare, lsangappa, rmadhavan Reviewed By: rmadhavan Subscribers: jenkins-bot, agarg, yugaware Differential Revision: https://phabricator.dev.yugabyte.com/D20253
- Loading branch information
Showing
5 changed files
with
235 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.