Commit graph

75 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Amir
6572e15f53 Remove aws sourcedata duplication 2024-03-04 14:48:32 +01:00
Amir
45d50b2440 Blueprints: Add blueprint editing 2024-03-04 14:48:32 +01:00
regexowl
2464dab29e V2Wizard: Clean up OSCAP info
This removes "component=dl" from the OSCAP information.
2024-03-04 11:19:53 +01:00
regexowl
2bed43645d V2Wizard/test: Fix bug on registration step and enable tests
This fixes a bug on the registration step which made the text "Connect to Red Hat Insights" not to get rendered when registering with rhc.

All registration tests were also enabled in CreateImageWizard.test.tsx
2024-03-01 10:49:43 +01:00
lucasgarfield
e923cccd41 V2Wizard/Repositories: Add payload_repositories to request and test it
Previously the V2 Wizard's request mapper was only adding the
custom_repositories field. We also need to add a nearly duplicate
payload_repositories field due to how the image-builder API works...
which is admittedly not intuitive.

Tests are also added to ensure that requests are generated correctly
when using the custom repositories feature.
2024-03-01 10:02:52 +01:00
regexowl
08563b9dfa V2Wizard/test: Add autofocus to radios and enable Keyboard accessibility tests
This adds `autoFocus` attribute to radios on AWS, Azure and GCP step.

The Keyboard accessibility tests have been re-enabled.
2024-03-01 09:38:47 +01:00
mgold1234
89bee6a723 V2Wizrd: clean resource group when user change the source name
this commit fix https://github.com/osbuild/image-builder-frontend/issues/1691
when user change the source name, resource gruop should clean up
2024-03-01 09:14:18 +01:00
mgold1234
3118fc0112 v2Wizard : Add Azure to review 2024-02-29 15:29:03 +01:00
regexowl
8b224a0327 V2Wizard: Remove bulk select and refresh button from the Packages step
This removes bulk select and a refresh button from the Packages step and updates tests accordingly.
2024-02-29 12:39:09 +01:00
regexowl
d9f9c61307 V2Wizard: Add packages to requestMapper
This adds packages to the request mapper in a needed format - a flat list of package names.
2024-02-28 17:17:00 +01:00
regexowl
2c6c326677 V2Wizard: Add packages to the Review step
This adds packages counter and a table of packages in a popover to the Review step.

The name of the field was also updated to "Additional packages".
2024-02-28 17:17:00 +01:00
regexowl
af80b78e93 V2Wizard: Add Packages step
Previously we've used two steps for adding packages - the Additional Red Hat packages and Additional Custom packages steps. This merges the two steps into one.

Also the steps originally used `DualListSelector` to show the packages options, this was now migrated to the packages `Table` which makes the step visually consistent with the Repositories one. Although the functionality is a bit different.

Repositories step fetches the complete list of repositories right at the beginning and then mutates it by filtering. The Packages step fetches the data based on a search term which means that the "All" table gets overwritten by new values anytime a new term is searched.

Previously used axios API calls were also migrated to RTK Query for the purpose of consistency.
2024-02-28 17:17:00 +01:00
regexowl
ac4a0829e2 V2Wizard: Add Packages step to the Wizard
This adds Packages to the new Wizard as a substep of the Content step.
2024-02-28 17:17:00 +01:00
regexowl
607bd6ed45 V2Wizard: Create a folder for Packages step
This creates a new folder for the Packages step and copies over needed file:
- Packages.tsx
2024-02-28 17:17:00 +01:00
lucasgarfield
a22f0deacc V2 Wizard: Fix AWS account id in review step (HMS-3553)
The AWS account id was not displayed correctly in the review step in the
case that a source was being used. This commit fixes the issue. When a
source is used, the AWS account id is fetched as before in order to
display it on the AWS step - but that value is also now dispatched to
the store so it can be referenced later (like in the review step).
2024-02-28 14:33:11 +01:00
mgold1234
ba42cceac4 V2Wizard: add azure case to the requestMapper 2024-02-28 12:10:00 +01:00
mgold1234
f77cc39135 V2Wizard: add all necessary components 2024-02-28 12:10:00 +01:00
mgold1234
fa016c3228 V2Wizard: Create a folder for Azure step and copy needed components
This created a new folder for the Azure step and copies components that will be needed:
- AzureAuthButton.tsx
- AzureResouceGroups.tsx
- AzureSourcesSelect.tsx
2024-02-28 12:10:00 +01:00
regexowl
5ab0b6511b Blueprints: Add guest-image and vsphere-ova to requestMapper
This adds guest-image and vsphere-ova as possible target environments to the requestMapper.
2024-02-27 15:09:39 +01:00
lucasgarfield
8c31e6f54f V2Wizard/Registration: Add request assertion tests
We need to start using `undefined` as the default state for when a value
has not been defined. Previously we had used things like `’’` for string
typed values. But this causes problems later when generating the request
we send to image-builder. Using `undefined` is explicit and will make
generating the requests much easier (as we don’t need to check for `’’`,
determine the intent, and convert it to undefined if necessary).
Explicit is better than implicit.

With that in mind, tests have been added to ensure that the correct
request is sent to the API for every option on the Registration step.
This is facilitated using a new `spyOnRequest()` function. In the
future, we will have similar tests for the rest of the steps.

A few other minor things:

1. We need to get the `store` using `useStore()`
for when we later call `store.getState()` because the tests use a different
store that is configured in the renderer than the one we were importing.

2. In the wizardSlice, a new type RegistrationType is added that provides
additional type safety instead of using `string`.
2024-02-14 17:01:52 +01:00
mgold1234
40b1d4de57 v2Wizrd: add kernel and services data
this commit adds kernel arguments and enabled/disabled services to Oscap step.
and also add to Review step, add some tests to kernel and services as well.
2024-02-12 17:12:26 +01:00
Amir
74f71f2dca Blueprints: Add handler for creating new blueprint 2024-02-12 15:12:14 +01:00
mgold1234
07cfaf2ccf feat(HMS-3566) V2Wizrd: fix titles at aws step 2024-02-09 11:47:18 +01:00
mgold1234
61abf24644 V2Wizard: fix ReleaseLifecycle component in the Review step
this commit fix https://github.com/RedHatInsights/image-builder-frontend/issues/1615
add the relevant data to release lifeCycle at review step
2024-02-07 08:40:24 +01:00
mgold1234
c80e933c2c V2Wizard: Create a folder for Review step and copy review component and enable tests
This created a new folder for the Review step and copies components that will be needed:
- ReviewStep.tsx
- ReviewStepTables.tsx
- ReviewStepTextLists.tsx
2024-02-06 14:16:16 +01:00
mgold1234
854d87c2f2 Resolve Controlled Component Error by Initializing with Empty Strings
This commit fixes the "A component is changing an uncontrolled input to be controlled" error in React components by ensuring input values are consistently initialized as strings. Previously, values initialized as undefined led to inconsistencies in controlled component behavior. By initializing with empty strings or using value={someValue ?? ''}, we ensure that input components remain controlled throughout their lifecycle, complying with React's expectations for controlled components and enhancing overall component stability.
2024-01-30 10:58:48 +01:00
regexowl
8a178f5b7d V2Wizard: Add components to the Repositories step skeleton
This adds needed components to the Repositories step skeleton.
2024-01-26 14:04:56 +01:00
regexowl
3c441425bb V2Wizard: Add checkRepositoriesAvailability
This adds checkRepositoriesAvailability.ts to a newly created `utilities` folder.
2024-01-26 14:04:56 +01:00
regexowl
7fe7919dfa V2Wizard: Add Repositories step to the Wizard
This adds Content as a step and Repositories as a substep to the Wizard.
2024-01-26 14:04:56 +01:00
regexowl
e854ee390c V2Wizard: Create a folder for Repositories step
This creates a new folder for the Repositories step and copies over all needed files:
- Repositories.tsx
- RepositoriesStatus.tsx
- RepositoryUnavailable.tsx
2024-01-26 14:04:56 +01:00
dependabot[bot]
f081ca78b0 V2Wizard: add Details step to wizrd2
this commit add Details step to v2Wizard
2024-01-25 12:48:25 +01:00
mgold1234
c4e1709de8 V2Wizard: add oscap to wizard2
This adds the OpenSCAP step to the V2Wizard,
adds new values to the wizardSlice and enables relevant tests in the `CreateImageWizard.test.tsx` test suite
2024-01-24 13:36:04 +01:00
regexowl
360984df7c V2Wizard: Add components to the Registration step
This migrates all the needed components from Javascript and DDF to Typescript and RTK.

New slices were added for registration type and activation key.

Disabling the "Next" button should work correctly now.
2024-01-17 09:33:13 +01:00