Commit graph

131 commits

Author SHA1 Message Date
lucasgarfield
ddca8d7430 V2 Wizard: Disable back on first step (HMS-2781)
Disables the back button on the first step of the wizard. Disabling the
back button (as opposed to hiding it) is how the wizard works in the
Patternfly official examples.
2024-04-23 14:23:59 +02:00
lucasgarfield
a1bdcaa54f V2 Wizard: Fix OpenSCAP step
OpenSCAP profile info is now correctly loaded into the state and
verified to be in the final request with tests.

I modified the fixtures for the OpenSCAP profiles. My changes ensure we
have a Venn-diagram like overlap when changing from one profile to
another where one package is the same, one package is removed, and one
package is added. The same is true for the services and partitions. For
kernel args it is not so important as that is just a string (as opposed
to an array), so it is enough to be different.

I was able to eliminate a useEffect by replacing it with a lazy query
trigger function. Setting the second arg `preferCacheValue` to `true`
means that a request is only made if cached data is not available.

I modified the Redux reducers a bit to add some additional safety.

`changeFileSystemPartitionMode` is now responsible for initializing the
partitions field in the state by adding the root partition – previously
this was done in the components themselves by dispatching
`addPartition`. This reducer can always be safely dispatched – if the
mode is ‘manual’, dispatching it with a payload of ‘manual’ will not
result in any changes to the state.

`addPackage` is also safer now. When a package is added, the list of
packages is checked. If there is a package with an identical name, the
new package overwrites the previous package. This is useful because the
description may be different for the same package – for instance, when
adding an OpenSCAP package, we use a custom description (‘this package
required by OpenSCAP’).
2024-04-23 10:02:03 +02:00
regexowl
af5d99324d V2Wizard: Update wording on repo removal modal in Edit mode
This updates wording on a repo removal modal in Edit mode as per UX feedback.
2024-04-22 13:43:06 +02:00
regexowl
9f04b4f5e4 V2Wizard: Update save button
This removes the second "Save" from a save button on Review step.
2024-04-22 13:37:40 +02:00
regexowl
13c21d0eff V2Wizard: Update repo removal alert and modal
This updates alert and modal based on UX feedback.
2024-04-19 16:26:27 +02:00
regexowl
250f84ae9d V2Wizard: Add alert when removing repos in Edit mode
When in Edit mode an alert is displayed on the Repository step warning users, that removing repository and leaving packages from it added is not recommended.

A modal pops up when deselecting a repository to make user aware they may be breaking their blueprint.
2024-04-19 14:37:25 +02:00
regexowl
bd2860890a V2Wizard: Add wizardMode to the state
This adds a new field called `wizardMode` to the state. This field can have two possible values: `create` and `edit` and it indicates whether the Wizard was opened in Create or Edit mode.
2024-04-19 14:37:25 +02:00
regexowl
2fa2c0efa6 V2Wizard: Add recommended repositories to compose request
This adds recommended repositories to the custom and payload repositories in the compose request.
2024-04-19 14:06:43 +02:00
regexowl
c56a011443 V2Wizard: Select a repository when added from recommendations
This selects a repository on the Custom repositories step when it's added on the Packages step from the recommendations.

The check box is also disabled as removing the repository would have to trigger removal of the added packages as well.

And expandable with explanation about the disabled check box was added.
2024-04-18 18:04:48 +02:00
Ondrej Ezr
709ae39d23 WizardV2: Validate steps through redux state
Store validation status in redux state.
This is bit complex on the redux side, but pretty simple on the components.
It allows for reuse of the validation state instead of revalidating wherever needed.
2024-04-18 10:01:06 +02:00
regexowl
dbeee5d066 V2Wizard: Differentiate between Create and Edit mode on Review step
This renames actions on the primary button on Review step for the Create mode so it's clear whether you're creating a blueprint from a scratch or saving changes to an already existing blueprint.
2024-04-17 18:46:49 +03:00
Ondrej Ezr
1b4bb9869e WizardV2: use the alert color darker 2024-04-16 20:56:32 +03:00
Jakub Rusz
68bfa8c351 V2Wizard: Add ouiaId for FileSystemTable
Need this to distinguish it from the table in V1.
2024-04-16 18:06:05 +03:00
regexowl
8a7d15e54d V2Wizard: Update Registration copy
Noticed there's been a small change in the copy of Registration steps as per Blueprints SPUR. This updates the text.
2024-04-16 11:59:31 +02:00
lucasgarfield
782a8eba7e V2 Wizard: Add custom file system to request customizations (HMS-3690)
The blueprint request now contains a field for the filesystem in its
customizations.
2024-04-16 10:02:19 +02:00
Jakub Rusz
eb82a6b72b V2Wizard: Add ouiaId to ValidatedTextInput 2024-04-15 19:16:21 +02:00
Jakub Rusz
fc9a119933 V2Wizard: Update ouiaIds for File system configuration
Making it consistent with V1 wizard.
2024-04-15 18:21:32 +02:00
regexowl
70b7ab7e29 V2Wizard: Update wording on "Custom repo" modal
This updates the wording on "Custom repositories will be added to your image" modal, informing the user, that the repository will get enabled in Content as well, if it wasn't enabled before.
2024-04-12 12:45:36 +02:00
regexowl
16ab5b37c5 V2Wizard: Add recommended repo to the repo table on Review
This adds the recommended repository to the table of repositories on the Review step.
2024-04-12 12:45:36 +02:00
regexowl
b7f6393be9 V2Wizard: Allow enabling repos and update state logic
This commit contains two changes:
1. When a package from popular repository gets added, the EPEL repository gets enabled in content services in case it wasn't before.
2. The logic of rendering states for the different toggle combinations on Packages step got updated.
2024-04-12 12:45:36 +02:00
regexowl
3b843a0d40 V2Wizard: Replace "Adding recommended repo" alert with modal
This replaces the previously used Alert displayed when adding a package from repo recommendations with a modal as per mocks.
2024-04-11 13:00:17 +02:00
regexowl
a3e98b3894 V2Wizard: Update rendering packages info on edit
This fixes information rendered when a package info is read from the request on Edit.
2024-04-11 11:41:46 +02:00
regexowl
43cb43dac8 V2Wizard: Add tally to the "Selected" toggle
This adds a tally of selected packages to the "Selected" toggle.
2024-04-11 11:41:46 +02:00
regexowl
f375fc5c41 V2Wizard: Update links
There were incorrect links used for the content service, this fixes them.
2024-04-11 11:41:46 +02:00
regexowl
923c4fc2d5 V2Wizard: Add "Searching" state for packages
This adds "Searching" state for packages table when the data is being fetched.
2024-04-11 11:41:46 +02:00
regexowl
972190ecaf V2Wizard: Update create/edit button copy
This updates copy on the Save changes button as per recent mocks.
2024-04-10 13:44:22 +03:00
Michal Gold
4ba9235b1b V2Wizrd: remove Duplicate mount points warning 2024-04-10 08:30:13 +02:00
Amir
442d88a4ce fix(HMS-3850): V2Wizard:use menu toggle for save and build 2024-04-09 14:56:34 +02:00
Ondrej Ezr
54d032e0f0 WizardV2: filesystem mountpoint size validation 2024-04-09 13:40:35 +02:00
Ondrej Ezr
561e82827e WizardV2: filesystem units and size 2024-04-09 13:40:35 +02:00
Ondrej Ezr
3c3ca3537a WizardV2: Filesystem partitioning suffix 2024-04-09 13:40:35 +02:00
Michal Gold
9cddbdfa38 V2Wizard: Add ouiaIds to File System step
this commit adds ouiaIds to the file system for automation and manual configurations and for text input field.
2024-04-09 12:56:38 +02:00
Amir
e5bfc19194 WizardV2: Add draggable mount point 2024-04-09 12:48:17 +02:00
Jakub Rusz
0a62e0d286 V2Wizard: Fix plural sources
We're actually selecting a singular source to share the image with. It's
the same in V1 wizard.
2024-04-09 12:10:46 +02:00
Amir
ba3a2dc333 WizardV2: map oscap to wizard request 2024-04-08 13:59:41 +02:00
regexowl
94525815a0 V2Wizard: Fix VMware capitalisation
This replaces VMWare -> VMware as per mocks.
2024-04-05 16:22:27 +02:00
regexowl
00ba723195 V2Wizard: Add recommended repositories to the Review step
This adds recommended repositories to the Review step.
2024-04-04 14:01:42 +02:00
regexowl
ee2498a43b V2Wizard: Concatenate recommended repos with payload and custom ones
This adds recommended repos to payload and custom ones, including the needed conversion.
2024-04-04 14:01:42 +02:00
regexowl
bfd7420925 V2Wizard: Add repository recommendations
This PR is a part of Proactive Assistance - Repository recommendations.

New toggle group was added which allows user to see results from non-added repositories in a case that searched term didn't return any results from added custom and distribution repos.
2024-04-04 14:01:42 +02:00
regexowl
39cb4336b4 V2Wizard: Make convert repository functions exportable
This make `convertSchemaToIBCustomRepo` and `convertSchemaToIBPayloadRepo` functions exportable.
2024-04-04 14:01:42 +02:00
regexowl
91873dc810 V2Wizard: Initialize packages with OpenSCAP
This initializes packages upon a selection of an OpenSCAP profile.

Current logic also fixes a bug previously present in V1 - when changing an OpenSCAP profile with other previously chosen packages, the packages outside of the profile persist and don't get removed.
2024-04-04 12:34:57 +02:00
regexowl
d219a233d9 V2Wizard: Update removePackage reducer
This updates the `removePackage` reducer so it takes only a name of a package as an argument instead of the entire package object.
2024-04-04 12:34:57 +02:00
regexowl
f71175f69b V2Wizard: Add full bottom pagination to Repositories and Packages
This adds full pagination to the bottom of Repositories and Packages steps which will allow the user to get to the very end of the tables in a case of many results.
2024-04-04 11:35:07 +02:00
regexowl
a1372adb94 V2Wizard: Update copy based on SPUR
This updates the copy of the Wizard steps based on the recent SPUR.
2024-04-04 11:26:26 +02:00
Amir
a46732d560 WizardV2: add 'register-later' to state mapper 2024-04-04 10:09:54 +02:00
regexowl
155962c141 ESLint: Resolve useSelector-prefer-selectors errors
This resolves all occurences of useSelector-prefer-selectors errors.
2024-04-02 20:21:34 +02:00
Michal Gold
698d21df42 V2Wizrad: fix validation at file system step (HMS-3733)
this commit fix validation when usr choose duplicate mount point
andwhen there is no root partition
2024-04-02 15:25:37 +02:00
lucasgarfield
d97a401a53 V2Wizard: Center messages in packages table (HMS-2781)
The copy in the packages table (too many results to show, etc...) was
not centered because the table actually has 5 columns, not 4. This fixes
the problem.
2024-04-02 11:29:57 +02:00
regexowl
d2c56391f9 V2Wizard: Update "Too many results" copy
This updates copy shown in a table when too many results are fetched. Also a period was added to the end of the empty state bodies.
2024-04-02 10:59:41 +02:00
regexowl
835920a555 V2Wizard: Add test IDs to Packages step
This adds data-testid to the Packages search input and to the Available and Selected toggles.
2024-03-28 09:35:16 +01:00