This updates the logic of parsing bytesize into size/unit pair.
Currently 'GiB' is set as a default which causes problem with smaller partitions on Edit.
A validation for the min_size is in place and the rule is that the size cannot be smaller than 0 of a given unit. If there was a partition with smaller size in KiB it will break the rule when converted to GiB.
It will be better to keep the stable branches in sync as much as
possible. If snapshotting is only ready for prod-preview, we should only
expose it in stage-preview.
Edit mode is now fully tested and working for OpenSCAP profiles. A
handler for the PUT request was added and the fixtures were updated to
support this.
`EditImageWizard.tsx`: Previously we dispatched `initializeWizard()`
while waiting for the blueprintDetails to load. This meant that the
state was incorrect (empty) while the blueprintDetails request was
in flight.
`requestMapper.tsx`: Correctly populate state in edit mode if the
blueprint contains a custom file system – previously custom mountpoints
were dropped and automatic mode was selected.
`spyOnRequest()`: Differentiate between request types (e.g. GET, PUT)
for the same endpoint.
Fixes#1555
This reinitializes the state of AWS/Azure/GCP target after it's tile was deselected. This way the state for the target won't be hanging there.
This hides the "Manually configure partitions" option from the FSC step for blueprints which have only ISO selected as a target.
There is already an alert in place for cases when ISO is combined with another target.
The snapshot_date in the image_request must be a date. snapshot_date is
an optional field and if no snapshot is used, the field should be
undefined. Previously it was an empty string and this caused image
builder to return a code 400 with message "Snapshot date is not in
DateOnly (yyyy-mm-dd) format".
This updates padding around the popover button on OpenSCAP step and makes all `<HelpIcon>` icons the default size so it's consistent throughout the Wizard.
Fixes#1985
This concatenates masked service to the disabled services so both get rendered in the "Disabled service" code block.
Test to check this was also added.
This updates copy on empty state when no packages are found with "Available" and "Included repos" toggled.
Copy on "Selected" and "Other repos" was also updated.
The popovers for VMware sphere types were not buttons. This caused weird behaviour with "ban" cursor when disabled and not opening popover when enabled.
I was bothered by the organization's id in Activation key popover not being separated by an empty line. While adding it I've noticed we duplicated the component on Review step. Cleaned up the code a bit and got rid of a useEffect.
This adds a new empty state to the "Other toggle" for "Selected" packages which will inform user, that their added packages are under "Included repos".
Previously when a package from an other repo was selected, it was still shown under "Other repos" toggle.
As a recommended repository gets added together with the package, it should be shown under "Included repos".
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.
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’).
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.
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.
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.
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.
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.
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.
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.