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.
This adds a test to check whether validation messages get rendered on import.
Each step is checked for the correctly rendered error messages and then all invalid values are cleared so Next button re-enables and it's possible to continue.
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.
There is a bug that makes `custom-first-boot` service stay in services when the first boot script is removed.
How to reproduce:
1. create a blueprint with a first boot script
2. download the blueprint and confirm `custom-first-boot` was added to enabled services
3. click on "Edit blueprint"
4. go to First boot step and remove the script
5. save edited blueprint
Current behaviour:
- `custom-first-boot` service should be still enabled even with the removed first boot script
Updated behaviour:
- `custom-first-boot` is no longer in the blueprint after first boot script got removed
Status icon rendered only when the step was previously visited, this caused problems with imported blueprints.
How to reproduce a bug:
1. import a blueprint with invalid hostname
2. skip to Review
Current behaviour:
- the Create blueprint button is disabled, but there is no indication of error next to the Hostname step in navigation
After fix:
- the error status should be rendered next to the Hostname nav item