This commit refactors the Minimun size field by replacing HookValidatedInput with the new ValidatedInputAndTextArea component.
It fixes a bug where the error icon remained visible after the user cleared the value in the field.
Fixes#2961
Activation key loads in background even if a user skips to the review step.
The unwrap is there to extract only the actual response data, if the query fails, the exception will be caught in the catch block anyways, so there was no need to keep the whole action object.
And the refetch was being called before the createActivationKey query was initiallized, throwing an error and not letting the async query in try block to finish fetching the activation key.
This commit adds password validation to the User step:
- Moved password validation logic to a separate `checkPasswordValidity` function, returning detailed results (strength and validation state).
- Simplified validation in `PasswordValidatedInput` by using `checkPasswordValidity` results directly.
- Added dynamic password strength indicator showing success or error based on requirements.
- Integrated environment-specific validation messages (e.g., for Azure).
- Improved code separation between presentation and validation for better maintainability.
- Unit tests: Adds tests for invalid passwords, covering both default and Azure cases.
This commit refactors the Description field by replacing HookValidatedInput with the new ValidatedInputAndTextArea component.
It fixes a bug where the validation icon remained visible after the user cleared the Description field.
This commit refactors the SSH key field by replacing HookValidatedInput with the new ValidatedInputAndTextArea component.
It also fixes a bug where the validation icon remained visible after the user cleared the SSH key field.
The "No results found for <searchTerm>" options were previously enabled, but ignored upon click. This disables them properly and adds tests to check if they're disabled.
This removes sorting on the frontend side where it's already handled by the content sources API.
Since we manipulate selected packages by joining the, with `currentlyRemovedPackages` list, the sorting is added there to keep the packages from jumping around when unselected.
I noticed there is a bug that does not show a relevant list of services
that we create on user's behalf.
How to reproduce:
1. start creating a blueprint with a first boot script
2. go to the review step - the custom-first-boot service is not displayed there, but we are adding it on user's behalf
3. click on "Edit blueprint"
4. go to First boot step and remove the script
5. go to the review step - the custom-first-boot service is displayed
there, but we will remove it after clicking "edit"
This commit Implement refactor of HookValidatedInput for hostname and blueprint name
fields, addressing the following bugs:
1) Fixes a bug where the validation symbol persisted after a user deleted the value in the hostname field.
2) Fixes a bug where the validation symbol persisted after a user deleted the value in the blueprint name field.
These changes improve code maintainability and provide a more consistent user experience.
Modify the logic of removing a package so that it remains in the selected table for possible
re-addition until another package is removed or the wizard is switched to another screen
This adds the timezones to the step validation and renders an error when an invalid timezone is imported.
How to test:
1. import a blueprint with invalid timezone "foo"
2. select a target
3. go to Registration step
4. click on "Review and finish" button
Current behaviour:
- the "Create" button is disabled, but when navigating to Timezone step no error is displayed
After update:
- there is an error rendered under the timezone select
This commit splits the HookValidatedInput component into three separate functions to improve modularity and readability:
- `getValidationState`: Calculates the validation state ('default', 'success', 'error') based on whether the input is pristine and if there is an error message.
- `ValidatedInputAndTextArea`: Renders the TextInput or TextArea component, utilizing the `getValidationState` output.
- `ErrorMessage`: Displays validation error messages.
This refactoring enhances code maintainability and testability, and the updated structure is now implemented for the username field.