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.
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
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.
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.
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.
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
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.
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
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.
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.
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`.
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)
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.
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.
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.
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.
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.