Commit graph

608 commits

Author SHA1 Message Date
regexowl
52398547f8 Wizard: Move ouiaId from Select component to MenuToggle
This moves the `ouiaId` since it didn't get correctly assigned while in `Select`. It's readable under the `MenuToggle`.
2025-03-31 14:22:31 -05:00
regexowl
53625ed190 Wizard: Remove deprecated select for HyperV Generation
This swaps deprecated HyperV Generation select for a non deprecated one.
2025-03-31 14:22:31 -05:00
regexowl
c4dae746e7 Wizard: Replace deprecated Dropdown in BulkSelect
This updates deprecated Dropdown in `BulkSelect`.
2025-03-31 14:22:31 -05:00
regexowl
54983cddf9 Wizard: Swap release select
This replaces deprecated PF4 select with non-deprecated PF5 one.
2025-03-31 14:22:31 -05:00
regexowl
dcd1bb6fc9 Wizard: Swap FSC selects for non-deprecated version
This swaps deprecated PF4 Selects on FSC step for non-deprecated PF5 ones.
2025-03-31 14:22:31 -05:00
regexowl
2127476f98 Wizard: Swap arch select
This replaces deprecated PF4 select with non-deprecated PF5 one.
2025-03-31 14:22:31 -05:00
regexowl
019faf0ff9 Wizard: Remove if (!value) check from validators
This removes check for whether the value is defined from validators and moves it to the place the validator is called where needed.
2025-03-31 12:53:42 -05:00
regexowl
5ccc6622d9 Wizard: Remove strength indicator
This completely removes strength indicator as it includes the same information as the second Azure password helper text.
2025-03-31 15:25:38 +02:00
regexowl
056d3674d7 Wizard: Rename Empty to EmptyUserState
This renames `Empty` to `EmptyUserState` to make the name more descriptive.
2025-03-28 09:48:49 +01:00
regexowl
b5130e3a42 Wizard: Rename component directory to components
This renames `component` directory to `components` for the sake of consistency.
2025-03-28 09:48:49 +01:00
Michal Gold
02a3673fcc remove unused component 2025-03-26 10:24:42 -05:00
Michal Gold
d448db9a04 Wizard: Refactor Minimum Size input in File system step to use new component
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.
2025-03-26 10:24:42 -05:00
Katarina Sieklova
17f975e0ef Wizard: race condition with activation key
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.
2025-03-25 11:15:03 +01:00
Michal Gold
399126909c Wizard: Show "Strong" label only for Azure when password meets criteria
Currently, we only want to display the "Strong" label when the password meets the required strength conditions and only if it is Azure target.
This change ensures that the label remains hidden for non-Azure cases.

Let’s just disable it for now until we can decide on further adjustments.
2025-03-21 15:51:32 +01:00
regexowl
3740c53375 Wizard: Compliance URL via suffix
This switches from a full path to a partial one, making the compliance url work properly in local dev environment.
2025-03-21 15:53:24 +02:00
Michal Gold
265ba2ac78 Wizard: Add password validation in User step
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.
2025-03-20 13:28:46 +01:00
regexowl
2a3c9b8b7d Wizard: Make Selects responsive 2025-03-19 11:39:23 +01:00
regexowl
fe3257c0d9 Wizard: Replace deprecated selects on Azure step
This replaces deprecated selects on the Azure step for non-deprecated ones.
2025-03-19 11:39:23 +01:00
regexowl
96cf08bf4d src: Remove width limiting for Wizard and ImagesTable
This removes `isWidthLimited` prop from Page component in Wizard and ImagesTable.
2025-03-18 14:37:53 -05:00
Michal Gold
6afaf49452 Wizard: Refactor Description input using new component
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.
2025-03-17 15:48:29 +01:00
Michal Gold
ea40280f1c Wizard: Refactor SSH key input using ValidatedInputAndTextArea component
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.
2025-03-17 14:21:52 +01:00
regexowl
939f25474c Wizard: Fix activation keys URL
This updates activation keys URL to behave the same way the content one does.
2025-03-14 18:21:45 +02:00
regexowl
b68eda9660 Wizard: Replace Object.assign() in validation
This replaces `Object.assign()` method in vaidation functions with separately populated values.
2025-03-14 15:09:58 +01:00
regexowl
5eef2b3f9a Wizard: Fix kernel validation
Kernel validation worked only for one invalid field on the step. Now it is able to validate both.
2025-03-14 15:09:58 +01:00
regexowl
88f41b0b75 Wizard: Disable "No results found" options
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.
2025-03-14 12:28:06 +01:00
regexowl
fbc0ea13e6 Wizard: Sort only selected on the frontend side
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.
2025-03-13 16:18:41 +01:00
regexowl
ff80aea171 Wizard: Remove "Too many results" state
This removes the "Too many results" state that was rendered when a search term returned more than 100 results.
2025-03-13 16:18:41 +01:00
Anna Vítová
7d6c623ee6 Wizard: add/rm firstboot service based on state
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"
2025-03-13 10:38:56 +01:00
Dominik Vagner
048baffc3f Wizard: add support of upload custom repositories 2025-03-13 08:57:56 +01:00
regexowl
e21d09b909 Wizard: Return of the testid
This adds `data-testid` back to the blueprint name input.
2025-03-12 13:02:44 +01:00
Michal Gold
12aa5cdf52 Wizard: Refactor hostname and blueprint name inputs
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.
2025-03-11 14:42:50 -05:00
Katarina Sieklova
1d39a57391 Blueprints: hiding unused activation key in when editing Blueprint
Fixed #2960

The Select dropdown in Registration wizard step no longer shows activation key when user decides to register later.
2025-03-11 16:15:40 +01:00
Adam Kankovsky
7aa3a3a6d5 Wizard: Edit to keep the last removed package among the selected ones
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
2025-03-06 14:47:31 +01:00
regexowl
9fdd6f0b43 Wizard: Add validation to Timezone select
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
2025-03-06 08:46:36 +01:00
Michal Gold
49fa0ee735 Wizard: Refactor HookValidatedInput component
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.
2025-03-05 16:07:36 -06:00
regexowl
ba233f2c69 Wizard: Rename ChippingInput to LabelInput
This just renames `ChippingInput` component to `LabelInput` and updates all imports.
2025-03-05 14:00:09 -06:00
Katarina Sieklova
2dcdcebda9 Wizard: make optional steps clickable
Fixes #2947

Optional steps get clickable after Register step was visited.
2025-03-04 11:26:53 +01:00
regexowl
75ddd854e8 src: Remove timezone and locale unleash flags
This removes `image-builder.timezone.enabled` and `image-builder.locale.enabled` gating as both were released to production.
2025-03-04 10:04:26 +01:00
regexowl
223a6a6780 Wizard: Deprecate Chip and ChipGroup components
`Chip` and `ChipGroup` components will be deprecated in PF6. This replaces them with recommended `Label` and `LabelGroup`.
2025-03-04 08:36:41 +01:00
Katarina Sieklova
9dc66ec1d0 Wizard: bigger space between in target envs in review 2025-03-03 11:25:11 +01:00
Katarina Sieklova
d527c2607e Wizard: resolving className modifiers 2025-02-28 09:24:41 +01:00
Katarina Sieklova
e3fde5eb9b Wizard: fix indentation of manual file system config
Fixes #2910

Indentation of manual file system configuration in the review step of the wizard was aligned.
2025-02-28 09:24:41 +01:00
regexowl
56e85e0954 Wizard: Add masked services input
This exposes masked services in the UI by adding a masked services input.
2025-02-27 12:46:29 -06:00
regexowl
59e383fe5a Wizard: Remove first boot script from services when no script
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
2025-02-26 16:48:32 +01:00
Katarina Sieklova
26f56bf9f0 Wizard: reseting page to default state
Fixed #2865

OpenSCAP profile page in Compliance step clears after selecting "None" or "X" in the dropdown.
2025-02-26 14:23:41 +01:00
dependabot[bot]
35bb95438b Wizard: Switch view to "Available" when searching for package
this fix an issue when user search for a package, the viewv stay "Selected"
instead of switching to "Available

fix one test
2025-02-24 12:00:31 +01:00
regexowl
4907d3048f Wizard: Remove obsolete css
This removes css styles for `DualListSelector` we no longer use and a temporary pagination fix that was already addressed directly in PF.
2025-02-24 11:12:22 +02:00
regexowl
609397d411 Wizard: register-later for non-RHEL images
This sets registration type to `register-later` when a non-RHEL distribution is selected.
2025-02-17 14:26:53 +01:00
regexowl
03294389b1 Wizard: Disable already selected language options
This disables language options that were already added to the image, rendering a description to make the disabled option clear.
2025-02-17 12:49:03 +01:00
regexowl
62bbf6d688 Wizard: Add step validation to Locale
This adds step validation to Locale, allowing to properly validate imported values.
2025-02-17 12:49:03 +01:00