Commit graph

1588 commits

Author SHA1 Message Date
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
regexowl
086ac6c9ec devDeps: Manually bump msw from 2.7.0 to 2.7.3
This bumps msw from 2.7.0 to 2.7.3
2025-03-18 09:49:46 +01: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
331f1dd45a test: Add validation test for import
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.
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
526037ea08 test: Add test for unselecting selected package
Adding a test to verify that the last package removed from selected remains in the table until switching to another screen.
2025-03-06 14:47:31 +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
Sanne Raymaekers
b91981c17c store/cockpitApi: correct getBlueprint's cache tags
After editing a blueprint, the blueprint needs to be invalidated.
2025-03-06 13:12:33 +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
regexowl
44752426f6 deps: Bump @redhat-cloud-services/frontend-components from 4.2.22 to 5.2.6
This bumps @redhat-cloud-services/frontend-components from 4.2.22 to 5.2.6 and updated `<AsyncComponent>` props. `appName` is no longer supported.
2025-03-04 12:09:35 +01: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
57fab5fd80 LandingPage: Add NewAlert for added customizations
This updates `NewAlert` to inform about new customizations available in Images.

Local storage item name was also updated.
2025-02-28 08:44:52 +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
Katarina Sieklova
daac042df8 Changed to switch statement 2025-02-25 12:09:33 +01:00
Katarina Sieklova
17709cf093 Blueprints: invalid message variant on upload
Fixed #2919

Error message has error variant when uploading invalid blueprint.
2025-02-25 12:09:33 +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
Katarina Sieklova
285bee5f8d Blueprints: Import Blueprint modal error rendering
Fixed #2905

Fixes error rendering when invalid blueprint is uploaded.
2025-02-19 15:19:31 +01:00
regexowl
bf704af1e7 ImportModal: Increase maxSize
This increases limit for the maximum size of a blueprint.
2025-02-17 15:13:32 +01: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
Klara Simickova
75770dc97f Revert "Wizard: Sticky footer returns"
This reverts commit e875f99f6b.
2025-02-13 17:02:29 +01:00
regexowl
e875f99f6b Wizard: Sticky footer returns
The original solution that broke some time ago works again. Removing the comments and temporary workaround.
2025-02-13 16:48:51 +01:00
regexowl
34720c799e src: Remove snapshots fallthrough logic
Snapshotting is available in prod-stable now. We can probably remove the fallthrough logic now.
2025-02-13 15:51:31 +01:00
regexowl
87d6c57174 Wizard: Fix nav status icon
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
2025-02-13 13:29:36 +01:00
Sanne Raymaekers
fd4fe79b41 CreateImageWizard/ImageOutput: hide description in cockpit
Lifecycle information isn't available yet, so let's just hide it.
2025-02-11 21:17:18 +01:00
Sanne Raymaekers
76f86c3711 CreateImageWizard: default to major releases on prem
In RHEL, VERSION_ID actually refers to the minor release. Let's strip
the minor component from it until we actually support those explicitly.
2025-02-11 21:17:18 +01:00
regexowl
4ccf932c21 Wizard: Remove CodeBlocks for "None" as a value
Render "None" just as a plain text when there are no values to be shown in the review expandable.
2025-02-10 10:47:55 +01:00
regexowl
16b3d60db1 test: Services edit tests
This adds services tests for the edit mode.
2025-02-10 10:35:42 +01:00