Commit graph

51 commits

Author SHA1 Message Date
Katarina Sieklova
2f034dffd8 Wizard: organize steps components into the "components" folders 2025-06-24 14:09:36 +00:00
regexowl
1ea1c2de8c Wizard: Add packages, kernel and services to Oscap step
This adds the information about profile packages, kernel arguments and services to the profile info list.
2025-06-24 12:12:54 +00:00
Katarina Sieklova
3e4ee6891d Wizard: fix filtering of OpenSCAP profiles
Fixes #3273
2025-06-24 07:16:32 +00:00
Katarina Sieklova
564c5461d4 Wizard: edit tests related to Compliance step 2025-06-18 07:25:00 +00:00
Katarina Sieklova
0cfe3dde30 Wizard: Fix "None" options in Selects for policies and Oscap profiles 2025-06-18 07:25:00 +00:00
Gianluca Zuccarelli
7f5013ef07 ReviewStep: fix alignment
Patternfly6 handles the grid for description lists slightly differntly
to Patternfly5. Add custom css to change the behaviour to match PF5 and
get the items in the review step to align properly
2025-06-12 13:29:58 +00:00
regexowl
91577343df src: Update <Content> tag components 2025-05-28 09:08:52 -05:00
regexowl
2080425753 src: Update remaining v5 version slugs 2025-05-28 09:08:52 -05:00
regexowl
4312cca4dd src: Run class-name-updater
This runs `npx @patternfly/class-name-updater src --v6 --fix`.
2025-05-28 09:08:52 -05:00
regexowl
1fc1f0cb8d src: Run codemods and lint
Run `npx @patternfly/pf-codemods@latest src --v6 --fix` and lint autofix to get the bulk of the changes in.
2025-05-28 09:08:52 -05:00
Lucas Garfield
0154452411 Wizard: Disabled OpenSCAP profile selection for RHEL10 2025-05-14 12:36:43 -05:00
regexowl
aedbbdc53a src: Remove unused data-testids
This removes unused `data-testid`s from the code base.
2025-05-09 10:14:54 +02:00
Katarina Sieklova
ee8698fe30 Wizard: make policy selector wider in Compliance step 2025-05-06 15:07:19 +02:00
Katarina Sieklova
cfa437a34b Wizard: edit compliance according to updated mockups
Changes the compliance step based on most recent mockups
2025-05-06 10:06:52 +02:00
Sanne Raymaekers
b203658bac Wizard: handle partition customizations properly
If there are no partitions defined in the policy or profile, leave
partitioning on automatic.
2025-04-30 11:38:12 +02:00
Sanne Raymaekers
40c9abfe9b Wizard: get rid of unneeded selected state in compliance step
Similar to the profile selector, just use the wizard store directly.
2025-04-30 11:38:12 +02:00
Sanne Raymaekers
3d545ed8ae Wizard: support tailored customizations
This splits the policy and profile selectors as they're drifting apart.

Instead of querying the customizations attached to the profile, query
the customizations attached to the policy, as these take into account
tailoring. As a result unnecessary customizations won't be added.
2025-04-30 11:38:12 +02:00
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
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
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
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
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
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
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
regexowl
ac725f3ae1 Wizard: Gate kernel info behind feature flag
This gates the visibility of kernel information behind a flag on the OpenSCAP step.
2025-02-07 18:32:52 +02:00
regexowl
87a908af35 Wizard: Gate services on OpenSCAP step behind flag
This gates the visibility of services on the OpenSCAP step behing a flag.
2025-02-07 18:32:52 +02:00
Gianluca Zuccarelli
6e9bd89b08 store/backendApi: create a useBackendPrefetch hook
Create a helper hook for RTK prefetch queries. This wrapper function
is needed since the imagebuilderApi and cockpitApi aren't at parity
yet.
2025-01-27 17:03:06 +01:00
Gianluca Zuccarelli
5a70e31d5a store/cockpitApi: empty get oscap profiles function
Create the boilerplate function for getting the Oscap profiles. We will
need to make a call to the `oscap` binary to get this information. So
we will leave it empty for now.
2025-01-27 17:03:06 +01:00
Gianluca Zuccarelli
aef3f4a3e4 multi: on-prem can't use the unleash flag
Switch the useFlag usage to the stub function defined in the
`useGetEnvironment` utility
2025-01-27 17:03:06 +01:00
regexowl
1b21852518 Wizard: Add kernel append input
This adds the kernel append input. New arguments can be added by pressing the "Add" button or hitting Enter after the argument.

The kernel arguments linked to a selected OpenSCAP profile are rendered in a category marked as "Required by OpenSCAP" and are read only.
2025-01-27 13:21:48 +01:00
regexowl
d8bb3485d8 Wizard: Add v5 PF slug to classNames
This adds v5 PF slug to classNames throughout the code base, making the formatting work properly.
2024-11-25 16:54:59 +01:00
Sanne Raymaekers
3ada1ceb68 Wizard: RHEL 10 support 2024-11-19 11:21:57 +01:00
Sanne Raymaekers
6ab32d1555 Wizard: use oscap profiles from major version for beta versions 2024-10-29 15:25:32 -05:00
regexowl
ba9282b61c src: Resolve circular dependency FileSystemTable <-> FileSystemConfiguration
Nothing got added, nothing got removed. Stuff just got moved around and imports are updated.
2024-10-11 14:55:03 +02:00
regexowl
acbb07ad53 Wizard: OpenSCAP profile is not a mandatory field
OpenSCAP profile was marked as a mandatory field, this removes the red asterisk as the profile is optional.
2024-09-25 17:37:33 +02:00
Sanne Raymaekers
cbb9598f1d Wizard: clear compliance data when switching between types
When switching between openscap and insights compliance, clear the data
so the profile information isn't showing anymore.
2024-09-25 15:26:09 +02:00
Sanne Raymaekers
4c6d277ff1 test: add test for insights compliance step 2024-09-25 15:26:09 +02:00
Sanne Raymaekers
e43357bf55 Wizard: add compliance step
The Insights compliance support reuses most of the existing OpenSCAP
step.

Depending on the state of the feature flag, it will show radio buttons
allowing users to switch between regular openscap and Insights
compliance.
2024-09-25 15:26:09 +02:00
Sanne Raymaekers
571fe18861 Wizard: support compliance in Oscap/OscapProfileInformation
Let's reuse this component for the compliance step.
2024-09-25 15:26:09 +02:00
Sanne Raymaekers
c6a9d0a17a Wizard: adapt Oscap step to new openscap customisations 2024-09-25 15:26:09 +02:00
Sanne Raymaekers
0897257125 src/store: Remove server store hooks
Removing the server store makes the way we handle data going in and out
of the wizard state more consistent. Each customisation is mapped into
the wizard state and pulled out when generating the blueprint
payload.

When the services and kernel customisations are implemented, this
information will need to be stored inside of the wizard state anyway.

Lastly this will make implementing a compliance step easier for edit
mode, removing the need to write to the wizard state from within the
server store when only a compliance policy id is available (on the
review page), which would be used to fetch the profile ref id, which
would in turn be used to fetch the customisations not stored in the
wizard state.
2024-09-16 11:45:54 +02:00
regexowl
e6a35eaf79 Wizard: Rename FileSystemPartitionMode to FileSystemConfigurationType
This renames `FileSystemPartitionMode` to `FileSystemConfigurationType` in preparation to expose raw/lvm partitioning in the UI.
2024-08-13 14:59:23 +03:00
regexowl
a3abc29f51 Wizard: Add eslint-disable to useEffect
This disables `react-hooks/exhaustive-deps` rule for dependency arrays that should run only once on mount and therefore need to stay empty.
2024-08-12 13:09:58 +03:00