Commit graph

897 commits

Author SHA1 Message Date
Ondrej Ezr
ad8fd5ddc3 Blueprint: Validate Blueprint name is not empty
We are now validating Blueprint name on the backend to be non-empty.
Adds same validation for frontend

Refs HMS-3801
2024-03-25 12:51:33 +01:00
Ondrej Ezr
aa0a3f107c Images: add popover when the image is outdated
Add Popover to inform user the image is build for an older then current Blueprint version.

Fixes HMS-3763
2024-03-21 12:14:37 +01:00
Michal Gold
71683a1ad1 fix one warning at useEffect on Oscap file
this commit fix a warning-
React Hook useEffect has a missing dependency: 'change'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
2024-03-21 12:06:01 +01:00
Gianluca Zuccarelli
d57cd95c65 V1Wizard: masked services -> disabled services
For the UX the user doesn't really need to know that the services are masked,
rather than disabled in the backend. We can simplify this and show the masked
services as disabled.
2024-03-21 11:16:50 +01:00
lucasgarfield
5dcc3abbd8 V2Wizard: Change search parameter from qcow to qcow2
`target=qcow2` is in better alignment with the UI than `target=qcow`
2024-03-20 18:04:44 +01:00
regexowl
a7cc88af44 V2Wizard: Add search parameter for target selection (HMS-3684)
Add an optional search parameter to the wizard like so:

`/insights/image-builder/imagewizard?target=iso`
or
`/insights/image-builder/imagewizard?target=qcow`

This results in wizard being opened and iso or qcow target being pre-selected. The Insights assistant chat bot will make use of this feature.
2024-03-20 18:04:44 +01:00
lucasgarfield
7c5a040ad7 V1Wizard: Change qcow search param to qcow2 (HMS-3684)
This commit changes the optional search param `target=qcow` to be
`target=qcow2` so it is in alignment with the UI.
2024-03-20 17:29:51 +01:00
regexowl
76fba98773 V1Wizard: Add search parameter for target selection (HMS-3684)
Add an optional search parameter to the V1Wizard like so:

`/insights/image-builder/imagewizard?target=iso`
or
`/insights/image-builder/imagewizard?target=qcow`

This results in wizard being opened and iso or qcow target being pre-selected. The Insights assistant chat bot will make use of this feature.
2024-03-20 17:29:51 +01:00
Anna Vítová
2d8b2b2796 fixes(HMS-3778): Show image name only after it is loaded 2024-03-19 14:59:44 +01:00
Gianluca Zuccarelli
0971ebf43c wizard/oscap: masked services customization
Add masked services as a customization option, since disabling systemd
units when the package isn't installed breaks the image build.
2024-03-19 10:59:31 +01:00
regexowl
bc8258146a Blueprints: More specific storage name
This makes the name for the Blueprints! feature alert more specific in the localStorage.
2024-03-18 16:24:07 +01:00
regexowl
ea7f7168ab Blueprints: Make Blueprints! alert dismissible
Fixes #1804

This adds a close button to the Blueprints! alert, making it dismissible.
2024-03-18 16:13:23 +01:00
Amir
465527bda0 Fixes #1770: keep blueprint card selected after editing 2024-03-18 10:21:03 +01:00
Anna Vítová
a3a7ea88c5 feat(HMS-3401): Add blueprints sidebar pagination 2024-03-18 10:06:05 +01:00
Simon Steinbeiss
ad25c6bcb7 V2 Wizard: Add search parameter for arch selection
Add an optional search parameter to the wizard like so:

/insights/image-builder/imagewizard?arch=aarch64

This results in the wizard being opened and 'aarch64' being pre-selected as the architecture.
The Insights assistant chat bot and our websites (access.redhat.com and
developers.redhat.com) will make use of this feature.

Relates to HMS-3684
2024-03-15 12:22:07 +01:00
regexowl
c0dfe0f218 V2Wizard: Disable changing of root partition
This makes the drop down for root partition disabled, preventing the user from creating a configuration without a root partition.

Option to add suffix was also removed for mount points which don't allow suffixes.
2024-03-15 11:35:46 +01:00
regexowl
03afb4c1df V2Wizard: Put Save button into div
This encloses Save button inside a div to make testing with widgetastic.patternfly library's pattern possible.
2024-03-15 11:17:03 +01:00
Michal Gold
0b6cf44bbc V2Wizard: change the default of file system table when user choose manual cunfiguration
this commit change the default table when user choose manual configuration at file system step
2024-03-15 09:52:49 +01:00
Simon Steinbeiss
9020392969 V1 Wizard: Add search parameter for arch selection
Add an optional search parameter to the wizard like so:

/insights/image-builder/imagewizard?arch=aarch64

This results in the wizard being opened and 'aarch64' being pre-selected as the architecture.
The Insights assistant chat bot and our websites (access.redhat.com and
developers.redhat.com) will make use of this feature.

Relates to HMS-3684
2024-03-15 09:08:57 +01:00
regexowl
a7d320e4a8 ESLint: Fix problems so linter check passes
This fixes errors caused by turning `@typescript-eslint/ban-ts-comment` on.
2024-03-14 15:04:12 +01:00
Michal Gold
0d2735fe0f V2Wizard: fix remove partition funtionallity (HMS-3753)
this commit add the remove partition functionlity to file system step
2024-03-14 14:21:14 +01:00
Michal Gold
1b6a570f71 V2Wizard: Add partition function (HMS-3752)
this commit add the addPartition function to support the adding partition
at the file system step
2024-03-13 16:04:15 +01:00
Ondrej Ezr
aa6b9789a7 Blueprint: Empty state action to link
Convert Empty state action to a link and add test for it.
2024-03-13 13:29:46 +01:00
regexowl
1c9b2242fa V2Wizard: Add FSC alert for bare metal images
This mirrors the functionality of https://github.com/osbuild/image-builder-frontend/pull/1786 in V2Wizard.

An alert was added to the FSC step to make users aware that customisations are not being applied to bare metal - installer images.
2024-03-12 10:53:48 +01:00
regexowl
e2d46640f9 Wizard: Add FSC alert for bare metal images
FSC customisations are not being applied to bare metal - installer images, this adds an alert to make users aware of the fact.
2024-03-12 10:16:54 +01:00
mgold1234
430ea83df0 V2 Wizard: Add File System Configuration Step (HMS-2781)
The FSC step is added to the wizard and takes full advantage of Redux
for state management.

This is still a work in progress.

Supported features:
1. Select partition mountpoint prefix (e.g. /var, /home)
2. Edit partition mountpoint suffix (e.g. /home/videogames)
3. Change displayed units (KiB, MiB, GiB)

Supported but buggy features:
1. Edit partition size

Unsupported features:
1. Add partitions
2. Remove partitions
3. Validation
2024-03-08 18:14:33 +01:00
Ondrej Ezr
9b5f3631d1 Blueprints: filter composes by blueprint version
Refs: HMS-3412
2024-03-07 17:19:32 +01:00
Ondrej Ezr
947c20875c ImagesTable: extract toolbar to separate component
This extracts the toolbar, that was getting bit too big to a separate component.
It also adjusts the title to correspond to the filter of the images.
If there is a Blueprint selected, it changes the title to '<BlueprintName> images'
2024-03-07 16:48:08 +01:00
lucasgarfield
8923d2c254 Blueprints Table: Add "new" alert
Adds an alert to explain the basic concept of blueprints to users.
Actual copy (and presence of emojis) is pending feedback from UX/copy,
this is just a placeholder for now.
2024-03-07 13:19:32 +01:00
regexowl
36dee34f94 V2Wizard: Update repository icons and names on Packages step
This updates the naming and the icons in the "Packages repository" column to be consistent with current mocks.
2024-03-07 12:39:25 +01:00
regexowl
6e1df015e1 V2Wizard: Replace h2 heading with h1 and sizing
This replaces h2 heading on the steps with h1 and adds a size modifier to keep the sizes approximately similar.
2024-03-07 09:33:44 +01:00
regexowl
8fac905482 V2Wizard: Gate table title behind experimental
This adds gating the ImagesTable title behind experimental so it doesn't render in the "classic" table.
2024-03-07 09:21:27 +01:00
Ondrej Ezr
64dbb4b912 Blueprints: Empty state create button
Make the empty state create button work.
It was a placeholder for now, we can have it working.
2024-03-06 14:02:33 +01:00
Amir
61b86da98a Blueprints: add blueprints slice for client global state 2024-03-06 12:52:03 +01:00
lucasgarfield
358dd70889 Blueprints table: Add title
Adds title to blueprints table. Later we will need to extract this into
a new component that changes the value depending on whether a blueprint
is selected or not (if blueprint is selected, it will need to show
blueprint name).
2024-03-06 12:32:27 +01:00
lucasgarfield
d204d4c5dc Blueprints Table: Clear selection button now a <Button>
As per discussion with UX, change the `Clear selection` card to a button
(link variant).
2024-03-06 10:34:22 +01:00
lucasgarfield
68e4cba9a3 Blueprints Table: Hide Create image button
This button is used to launch the wizard in the old images table, it
should not be used in the blueprints table (as the Create blueprint
button has been moved to the header).
2024-03-06 10:34:22 +01:00
lucasgarfield
ab31c7a54a Blueprints Table: Remove quickstarts
These are taking up too much space on the screen. Links to the
quickstarts need to be moved to more relevant locations. We are
currently working with UX on a design for this.
2024-03-06 10:34:22 +01:00
lucasgarfield
c73482dd7f Utilities: Add useExperimentalFlag hook
This commit DRYs out the code, extracting the logic for setting the
value of the experimentalFlag into a new hook found in the utilities.

It also makes the typing stricter - the hook returns a boolean. The
pattern we were using previously to set the value of experimentalFlag
variables could be boolean, string, or undefined.
2024-03-05 19:27:46 +01:00
lucasgarfield
baddf66273 Test: rename create-image-action data-testid
The data-testid for the Create image button in the empty state has been
renamed from create-image-action has been renamed to create-image-action-empty-state.

The test `renders EmptyState child component` started failing after changing
isBeta() from false to true in the useChrome() mocking function.

It was failing because the findBy query selector was able to find two
components with this data-testid, which was truly the case - the Create
Image button in the table header, and the Create Image button in the
empty state.

I have no explanation for why this test wasn't failing before.
2024-03-05 19:27:46 +01:00
Thomas Lavocat
c81ac76ea8 App: experimental features in beta only
When the unleash switch `image-builder.new-wizard.enabled` will get
activated on stage the blueprint and new wizard will be visible on the
platform.
To make them only visible in preview we need to change the condition to
check if Beta is selected by the user.
2024-03-05 19:27:46 +01:00
regexowl
6b79d5b1a8 V2Wizard: Remove aspectRatio
This removes aspectRatio from the ReleaseLifecycle chart. The set aspectRatio was causing incorrect rendering of the annotation line, making time travel during image building inevitable.
2024-03-05 18:34:28 +01:00
mgold1234
45d8426f10 change the import path for MajorReleasesLifecyclesChart
this commit change the path for MajorReleasesLifecyclesChart in the review.
this fix the correct path of import
2024-03-05 17:58:10 +01:00
Anna Vítová
5813fdaf10 feat(HMS-3686): Update position of blueprint buttons 2024-03-05 13:49:31 +01:00
Amir
97b7aa6bfd fix(HMS-3704): hiding blueprint out of sync alert 2024-03-04 18:11:10 +01:00
regexowl
e97291759c V2Wizard: Update ReleaseLifecycle dates on the Review step
This updates the ReleaseLifecycle dates used on the Review step.
2024-03-04 17:43:03 +01:00
regexowl
8666907dc9 V2Wizard: Move FormGroup outside of ActivationKeyInformation
This moves the FormGroup outside of the ActivationKeyInformation component and puts it higher into index of the Registration step. This way the group label does not get rendered on the Review step.
2024-03-04 16:52:57 +01:00
lucasgarfield
ad5d2007bb V2 Wizard: Add search parameter for release selection (HMS-3684)
Adding an optional search parameter to the V2 wizard like so:

/insights/image-builder/imagewizard?release=rhel8

results in the wizard being opened and RHEL 8 being pre-selected as the release.

The Insights assistant chat bot will make use of this feature.

The render() test utility function had to be updated to accept an
optional searchParams argument.
2024-03-04 16:43:55 +01:00
regexowl
f9350956f7 V2Wizard: Move OSCAP alert outside of OscapProfileInformation
This moves the "Additional customizations" alert outside of OscapProfileInformation which ensures it is not shown in the Oscap expandable on the Review step.

User can see the added customisations in the individual expandables, making the alert non-actionable extra information.
2024-03-04 16:38:43 +01:00
regexowl
f82b2453f9 V1/V2Wizard: Capitalise ID on Azure step
This capitalises id -> ID in the test of an alert on Azure step to keep consistent with the capitalisation throughout the step.
2024-03-04 15:59:38 +01:00