Commit graph

369 commits

Author SHA1 Message Date
regexowl
e6b030ea4c src: Remove ouia-ids
Since we're moving away from IQE the `ouia-id` atributes should be no longer needed. This removes them from the entire code base.
2025-04-25 11:32:43 +02:00
Simon Steinbeiss
c7dd274298 Wizard: Use SearchInput component for packages
As a small simplification and also to make the UX more consistent, let's
use a SearchInput widget over the custom InputGroup structure.
The only aspect lost in the process is the `validation` property that
doesn't exist in the SearchInput widget. It however only affects the CSS
styling of the searchbox and renders the 'error' state when there's only
a single character in the box. This may not even be desirable, given
that it's not really an error and that we show a note right below the
input box about this anyway.

This means the search boxes will also be consistent between the
repository and package search pages.
Fixes #3133
2025-04-25 11:06:49 +02:00
Bryttanie House
0238c04dfe Wizard: add support for content templates 2025-04-25 10:31:43 +02:00
Simon Steinbeiss
a1c32f90bb Wizard: Fix 'too short' state in Packages step
Currently, when a search term is entered and then reduced to a single
character in the Wizard's packages step, the previous results are still
shown.
What is expected is that the empty state hinting at the search term
being too short would be shown.

The condition in bodyContent was wrong, because it assumed that the list
of results would be 0 when in fact it wasn't being cleared.

Fixes #3139
2025-04-24 15:53:02 +02:00
regexowl
83e57baa0b src: Remove pkgRecs flag
Package recommendations are fully deployed to both stage and production. We can remove the flag from the codebase.
2025-04-23 15:23:52 +02:00
regexowl
0b843a64d9 Wizard: Update Users review text list
Only the first user got rendered, this should render them all and correctly add password indicator in import/edit mode when `hasPassword` is true.
2025-04-23 13:42:39 +02:00
regexowl
319880fc0b Wizard: Add password placeholder for edit mode
This uses the `hasPassword` value to render a password placeholder in edit mode.

The placeholder will indicate to the user that a password is present, but will not allow to show the password.
2025-04-23 13:42:39 +02:00
regexowl
22925f5005 Wizard: Update WSL popover wording
This updates WSL popover wording based on UX suggestions.
2025-04-23 11:16:58 +02:00
regexowl
6b0af16471 src: Addressing comments
- addressed AI comments
- fix tab indexing
- added username to the title of Remove user modal
- ensured "Invalid password" is not in the errors object before a password is filled in
- removing a user with empty user, password and ssh key fields does not prompt "Remove user" modal
- check for duplicate username
- focus on new user tab
- remove redundant tabIndex
2025-04-18 16:45:59 -05:00
regexowl
5cc5dd1258 Wizard: Add support for multiple users
This adds support for multiple users in the Wizard. The users are rendered in tabs and can be both added and removed. When clicking on remove button, modal pops up to inform user that the changes cannot be undone.

Neither password nor SSH keys are further required, making it possible to create a user with just a username.
2025-04-18 16:45:59 -05:00
regexowl
457d423d83 Wizard: Remove "Support" column
This removes "Support" column as per recent mocks.
2025-04-17 12:45:00 -05:00
regexowl
7f3d4efb6a Wizard: Add expandable rows
This makes the rows of packages table expandable and moves description down the level from a column to the expandable content.
2025-04-17 12:45:00 -05:00
regexowl
14590c1c41 Wizard: Minor changes
Render selected package count only when higher than 0. Rename "Package name" column to just "Name".
2025-04-17 12:45:00 -05:00
regexowl
ad2d5d8e2b Wizard: Replace toggle with tabs
This replaces the previously used "Included/Other repos" toggle with tabs with the same functionality.
2025-04-17 12:45:00 -05:00
regexowl
70a97acc10 Wizard: Update periods at the end of lines
Removing/adding some periods for the sake of consistency.

I believe the description of the step should end with a period, helped texts and options should not (at least that's the prevailing pattern in the Wizard as of now).
2025-04-17 12:08:09 -05:00
Lucas Garfield
7f585154f2 Wizard/Oscap: Add analytics (HMS-5990)
The Intercom team has some ideas about helping new users determine which
security profile is right for them. Tracking differentiates between
"vanilla" OpenSCAP and Compliance so that any messages from Intercom can
be targeted.
2025-04-17 17:23:33 +02:00
Anna Vítová
561e9d164e Wizard: Fix Select's dropdown closing
This fixes a bug - when clicking outside the select dropdown, the
dropdown was not closed.
2025-04-16 16:37:47 +02:00
Katarina Sieklova
d18f25e331 Wizard: add segment tracking 2025-04-16 12:56:03 +02:00
Ondřej Budai
a50b6bdfae Wizard: fix a rerender loop in AzureResourceGroups
resourceGroup is used in useEffect, so if assigned a new array to it
every time this function is called, it would cause the useEffect to run
every time, leading to an infinite loop. This is because useEffect uses
Object.is to determine if the value has changed, and [] creates a new
array every time. Thus, we use a constant empty array to avoid this
issue.

Alternatively JSON.stringify(resourceGroup), or a deep comparison could
be used as a useEffect dependency, but that feels like just a waste
of resources.
2025-04-15 12:16:07 +02:00
regexowl
a367faab4a Wizard: Update WSL popover
This updates the text and the link in the WSL popover.
2025-04-15 10:08:05 +02:00
Anna Vítová
d2c9b77957 Wizard: add tests for satellite registration 2025-04-11 10:18:46 +02:00
Anna Vítová
75792bcc0a Wizard: rm pem validation, add cert warning
Since we support pem, cer, and der, we'd have to validate against each
of these on the frontend. Let's just check that the file is not empty,
and leave this upto users. On top of that, concatenated certificates are
supported, validating that would be too much. This commit also switches
token expiration error into a warning.
2025-04-11 10:18:46 +02:00
Anna Vítová
b6cdfdb102 Wizard: Add Satellite service and update mapper 2025-04-11 10:18:46 +02:00
Anna Vítová
58ec84c61e Wizard: add Satellite registration to review step 2025-04-11 10:18:46 +02:00
regexowl
ecce7c3b1e Wizard: Fix linting errors 2025-04-11 09:39:50 +02:00
Simon Steinbeiss
fef8685830 Wizard: Promote WSL to prod-stable 2025-04-11 09:39:50 +02:00
Simon Steinbeiss
966e0297c1 Wizard: Add Popover to show WSL is not supported
This Popover will inform users that despite being available in Insights
Image Builder in production, the WSL images for RHEL are not officially
supported by Red Hat.
2025-04-11 09:39:50 +02:00
regexowl
e9b73c55a4 Wizard: "No results" option should be disabled
This moves the "No results" option outside of options and renders it as a disabled option when `selectOptions.lenght === 0`.
2025-04-08 18:03:49 +02:00
regexowl
f3776bbf1a Wizard: Update useChrome import
This updates the way we import the `useChrome` hook.
2025-04-08 18:03:49 +02:00
regexowl
0431ac98dc Wizard: Switch from deprecated select in ActivationKeys
This replaces a deprecated select in `ActivationKeys` for a non-deprecated one.
2025-04-08 18:03:49 +02:00
regexowl
a34d5895d9 Wizard: Move PopoverActivation and ManageKeysButton
This moves `PopoverActivation` and `ManageKeysButton` outside from `ActivationKeysList` to their own separate components.
2025-04-08 18:03:49 +02:00
Amir
1d86950f45 Fedora-services: add support for fedora env 2025-04-03 11:50:51 +02:00
Justin Sherrill
38458810a0 change repo snapshot step to repeatable builds 2025-04-03 10:17:37 +02:00
Anna Vítová
a4034e8787 Wizard: add satellite registration, add jwt-decode
The jwt decode dependency helps us to keep track of the token that is
present in the Satellite command. jwt-decode is the most popular
dependency for the job, and very easy to use.
2025-04-03 09:46:41 +02:00
regexowl
3adf864c42 Wizard: Fix OpenSCAP select width
This adds a maxWidth prop to the OpenSCAP select. Previously the options overflowed on the right side of the screen.
2025-04-02 13:26:48 +02:00
regexowl
9e1285c6f3 Wizard: Update microcopy on Locale step (HMS-5656)
This updates microcopy on Locale step as suggested in the linked bug report.
2025-04-02 12:45:45 +02:00
regexowl
74e774e986 Wizard: for ... in loop to for ... of loop 2025-04-02 12:17:23 +02:00
regexowl
698037a0ae Wizard: Replace deprecated select in OpenSCAP step
This replaces v4 deprecated select for a non-deprecated one and moves some functions to separate files.
2025-04-02 12:17:23 +02:00
regexowl
248bc1d67a Wizard: Move stuff around, split into more components
This moves several files into `components` subdirectory and splits `Oscap.tsx` into more components to make the file shorter and easier to navigate.
2025-04-02 12:17:23 +02:00
regexowl
25368675bc Wizard: Make Select responsive 2025-04-01 11:07:38 +02:00
regexowl
b767c3bfde Wizard: Replace deprecated select in AwsSourcesSelect
This replaces a deprecated select in `AwsSourcesSelect` for a non-deprecated one.
2025-04-01 11:07:38 +02:00
regexowl
7a225e4146 Wizard: Add group input to User step
This adds a group input to the User step. The input is implemented as a `LabelInput`, when Administrator checkbox is checked, `wheel` group gets added and it's removal automatically unchecks the Administrator checkbox again.
2025-03-31 19:46:52 -05:00
regexowl
47b5eb8392 Wizard: Turn required category name into LabelInput prop
This swaps hardcoded value of the required `categoryName` in `LabelInput` for a prop, allowing to customize text for the reuired category independently on the component.
2025-03-31 19:46:52 -05:00
Gianluca Zuccarelli
e5a513a4cb CreateImageWizard: refactor oscap availability
Refactor the OpenSCAP on-premise availability check. Add the check to
the component so we run the check everytime the step is loaded. The
benefits to this is that if the user installs the packages, they won't
need to reload the page to use the OpenSCAP step. The downside is that
the check is not very quick, so a spinner was added just to indicate
that the check is running.
2025-03-31 18:02:11 -05:00
Gianluca Zuccarelli
20447f753a CreateImageWizard: on-prem prefetch
The openscap customizatoins endpoint for on-prem is quite slow since it
has to call the run the oscap tool to generate the customization
options. Running this request lazily, as we do for the service, is too
slow, so we can just prefetch the customizations for on-prem.
2025-03-31 18:02:11 -05:00
Gianluca Zuccarelli
18c329be2a CreateImageWizard: oscap options add spinner
The select `loadingVariant` seems to do nothing. Add a loader for when the
oscap profiles are being loaded.
2025-03-31 18:02:11 -05:00
Gianluca Zuccarelli
c38e821ae5 CreateImageWizard: warning for unavailable on-prem OpenSCAP
Add a warning if the required packages for the OpenSCAP step are not available.
2025-03-31 18:02:11 -05:00
Gianluca Zuccarelli
c7cd9e8de3 store/cockpitApi: query for oscap customizations
Use the oscap & scap-security guide packages on the host to get the
customizations for an OpenSCAP profile item.
2025-03-31 18:02:11 -05:00
Gianluca Zuccarelli
12a2649198 CreateImageWizard: unleash flag for oscap profile
Switch the hook used to get the flags for the OpenSCAPProfileInformation
component.
2025-03-31 18:02:11 -05:00
Michal Gold
978237bf84 Wizard: Fix blueprint name update on Architecture/Distribution changes
This commit resolves an issue where the blueprint name did not update when the user changed the Architecture or Distribution.
Additionally, it sets an initial value for blueprintName in the WizardSlice.
2025-03-31 16:10:05 -05:00