Commit graph

897 commits

Author SHA1 Message Date
Sanne Raymaekers
7b365dcb4d Wizard: handle dos scripts in first boot
Scripts in which lines are terminated by CRLF break the first boot
service, so let's make sure the line termination is correct.
2024-11-14 10:33:44 +01:00
Michal Gold
ba9546193e Wizard: add support for other input type in HookValidatedInput
adds `type` prop to `HookValidatedInput` with a default of 'text', to be able to support other type input like 'password'
2024-11-14 10:24:00 +01:00
Michal Gold
176c64dd47 Wizard: Add Users step to the wizard (HMS-4902)
This commit adds a new step 'Users' that is enabled only in stage-preview,
and will enable it in stage-stable once IQE tests are ready.
The step is not functional yet, this is just the first step.
2024-11-08 00:26:26 +01:00
regexowl
b84be929bb test: Add "VMware checkbox select and unselect works" test
This adds a new test to check functionality of the bug fix.
2024-11-04 08:44:35 -06:00
regexowl
79a4e98d0e Wizard: Fix VMware select and unselect
This updates the behaviour of VMware checkbox to make it possible to unselect VMware as a target.

How to reproduce:
1. select VMware vSphere checkbox
2. click on Virtual disk radio
3. try to unselect VMware vSphere checkbox

Previous behaviour - the checkbox can't be unselected
New behaviour - the checkbox can be unselected, removing relevant type of VMware target from imageTypes
2024-11-04 08:44:35 -06:00
regexowl
10f2669827 Wizard: Move VMware radios into VMware checkbox
This moves the VMware radios into the body of VMware checkbox, following PatternFly's pattern of parent and child checkboxes / form elements: https://www.patternfly.org/components/forms/checkbox#controlled
2024-11-01 12:34:52 -05:00
Michal Gold
830e22fcdc updating useFlag to omit feature flag from onPrem env 2024-10-30 10:36:18 -05:00
Gianluca Zuccarelli
41cdc7d553 ImageTable: use dynamic get blueprints hook
Export a dynamic query hook depending on which backend is
being used (service or on-prem). This means we can just import
a query from the new `backendApi` and it will work for both
on-prem and the service.
2024-10-30 10:36:18 -05:00
Sanne Raymaekers
6ab32d1555 Wizard: use oscap profiles from major version for beta versions 2024-10-29 15:25:32 -05:00
Sanne Raymaekers
692b6f1595 Wizard: only show compliance radio in preview
Let's expose compliance in preview while we're ironing out the creases.
2024-10-27 10:49:27 +02:00
Sanne Raymaekers
493649f766 Wizard: fix editing RHEL 9 beta blueprints
It would default to RHEL 9 instead of the beta.
2024-10-24 12:00:22 +02:00
Sanne Raymaekers
15a7115eec Wizard: move RHEL 9 beta out of preview 2024-10-17 21:45:12 +02:00
Sanne Raymaekers
cd70d1ff95 Wizard: add RHEL 9 beta
Only exposed in preview.
2024-10-17 10:22:30 +02:00
regexowl
46b6fda9db src: Resolve last remaining circular dependency
Nothing added, nothing removed, stuff moved around a bit.
2024-10-11 14:55:03 +02: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
076fb3fc9d src: Resolve type-only imports 2024-10-11 14:55:03 +02:00
regexowl
4e23c476e8 Wizard/test: Implement keydown for target tiles
This implements onKeyDown functionality for the Public cloud tiles, allowing selecting them with a Space key.

Corresponding test was also re-enabled.
2024-10-10 08:47:49 +02:00
regexowl
d46f6b83ac Wizard: Fix repos toggle height
The repos toggle height was slightly bigger than the Available/Selected toggle. This was caused by the popover button. Changes its size to small to fix the issue.
2024-10-08 16:44:36 +03:00
regexowl
f33a050120 Wizard: Default to Included repos in package search
Previously when you searched for package from repositories recommendations and switched to "Other repos", new search left you in Other repos and didn't show results even if they were found in "Included". Since we search for recommendations only when no matches were found in distro and custom repos, the results will be always empty.

This solves the problem by defaulting to "Included repos" toggle with every new search, limiting clicks required from the user.

How to reproduce previous behaviour:
1. search for 'gnuplot' packages
2. no results should be found, switch to "Other repos"
3. search for a distro/custom repo package like "vim"

Previous behaviour - the "Other repos" toggle is still selected, showing no results. When switching to "Included repos" manually, the results can be found there.

New behaviour - "Included repos" gets automatically selected, showing results for packages found in distro and custom repos.
2024-10-08 12:39:12 +03:00
regexowl
bde02b7eec Wizard: Fix incorrect aria labels
This updates previously incorrect aria labels for VMware popovers.
2024-10-07 10:48:55 +03:00
regexowl
5ad7470031 src: Prefetch list of targets on hover of Create blueprint button
This prefetches list of possible targets based on distribution for `onMouseEnter` event of Create blueprint button.
2024-10-06 11:38:57 +03:00
Dominik Vagner
2ef545111f Wizard: remove no repos selected message 2024-09-30 16:58:08 +02:00
Florian Schüller
faa3385054 CreateImageWizard/requestMapper: fix enabling firstboot
Reorder the code to be easier to read:

when there none of service.{enabled|masked|disabled}
firstboot also is not enabled (if requested)
this patch fixes this bug
2024-09-30 10:14:11 +02:00
Florian Schüller
bd8eaaf8b9 CreateImageWizard/requestMapper: fix enabling firstboot
when there none of service.{enabled|masked|disabled}
firstboot also is not enabled (if requested)
this patch fixes this bug
2024-09-30 10:14:11 +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
70635c8445 Wizard: adapt file system step to new compliance state 2024-09-25 15:26:09 +02:00
Sanne Raymaekers
0908cd2ae9 Wizard: add compliance step to the wizard
The title is changed depending on the flag, to make it easier to change
the IQE tests.
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
1a19684d97 Wizard: support compliance in review step
Reuses the existing oscap profile information.
2024-09-25 15:26:09 +02:00
Sanne Raymaekers
110e1d7d75 Wizard: support openscap compliance customisation in state
Merges all the compliance related state into a single compliance object.
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
regexowl
1d8067f1b0 Blueprints: Fix list of blueprint being replaced by empty state
Search input and list of blueprints could be previously temporarily replaced by an empty state.

How to reproduce previous behaviour:
1. start with some created blueprints
2. search for an existing blueprint
3. delete it
4. remove searchTerm from the blueprint search input

Before: the blueprint list and blueprint search input are temporarily replaced by an empty state, until re-fetch.
After: the list and search input persist throughout blueprint deletion and get replaced by an empty state only when there are no other blueprints
2024-09-24 17:48:50 +02:00
regexowl
49162e01f5 Blueprints: Set blueprintSearchInput as undefined with empty string
This dispatches changes to `blueprintSearchInput` and sets it as `undefined` when the value is an empty string.
2024-09-24 17:48:50 +02:00
regexowl
e051aa3f7f requestMapper: Fix enabled services with firstboot
Previously used `.push()` method was limited by non-writable length of the enabled services array, ending up in the following error:
```
 Uncaught (in promise) TypeError: can't define array index property past the end of an array with non-writable length
```

This fixes the problem by updating the array via spread operator.

Before: when creating an image with Oscap profile with enabled serviced and adding a firstboot script, the Create blueprint button at the Review step threw an error on click.
After fix: it's possible to create an image with Oscap profile that includes enabled services and a firstboot script.
2024-09-24 15:42:30 +02:00
regexowl
bc0ad00aa7 Wizard: Temporarily disable fixed footer
There's a new bug that's at least partially caused by styling commented out in this PR: when zooming in or out while in Wizard, the Wizard shrunks it's height to an unusable value.
2024-09-23 09:25:41 +03:00
Dominik Vagner
2c0d753d82 fix: unify snapshot date format 2024-09-19 09:12:16 +02:00
regexowl
003aa9df48 Wizard: Fix Registration bug
The second condition in `useRegistrationValidation` needs to be triggered only for `register-now` options, otherwise the Next button stays disabled on fetching and error even for `register-later`.
2024-09-18 16:16:32 +03:00
regexowl
39d2f91f03 Wizard: Add isPreview property to analytics tracking
This adds `isPreview` property to the analytics tracking with the use of chrome's `isBeta()`.
2024-09-18 12:47:22 +02:00
regexowl
b3d7a1606c Wizard: Validate registration with useValidation
This migrated Registration step validation to `useValidation`.

The scenarios in which the Next button and Create/Save button should be disabled are:
- any of "register now" options is chosen, but no activation key is selected
- activation key is selected, but it's invalid (information about it cannot be fetched)
2024-09-16 12:59:43 +03: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
Anna Vítová
3af0704a2f src: Enable import of image_requests 2024-09-04 17:45:11 +02:00
Anna Vítová
22c9b0c106 src: Cleanup import modal on close 2024-09-04 17:45:11 +02:00
Anna Vítová
c385417e93 HMS-4459: Use export endpoint 2024-09-04 17:45:11 +02:00
regexowl
558bb50c34 test: Add revisit step button checks
This adds tests to check that the revisit buttons on the Review step are working correctly.

Also some minor cleanup, namely making case used in the names of describe and test more consistent and moving render functions outside of functions selecting targets to make the structure easier to go through.
2024-09-04 01:21:28 +02:00
regexowl
4a15b25ceb Wizard: Optional steps
This adds an "Optional steps" section to the Wizard and moves all the non-mandatory customisation options there. "Review and finish" button was also added to allow jumping through the optional section.
2024-09-04 01:21:28 +02:00
regexowl
10f0c92410 Wizard: Fix "button in a button" warning
This adds a component prop to the expandable button, solving the `Warning: validateDOMNesting(...): <button> cannot appear as a descendant of <button>.` warning that was repeatedly printed to the test output.
2024-09-02 16:58:04 +02:00
regexowl
23aa2ae4c6 Wizard: Align revisit buttons
This aligns Revisit step buttons on the Review step with the second column of description lists.

The formatting of the expandable's toggleContent is formatted the same way as the main content. That way if the value of min-width gets updated, the spacing will stay consistent.

The duplicate code was moved to `composeExpandable` function that takes two arguments - name of the expandable/step and a stepId that links to the correct step in the Wizard.
2024-08-30 16:12:55 +02:00