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
The way the on premise wizard is initialized needed to be tweaked to
make it work for isEdit. Let's assume that the host distro and host
architecture are already correct in the blueprint.
Add a component to display when the osbuild-composer socket
is not running. We could potentially try start the socket
in the future when clicking the button, rather than re-directing
to the cockpit services plugin.