Commit graph

897 commits

Author SHA1 Message Date
Amir
a911c02780 Blueprints: add blueprint's images empty state 2024-03-04 15:36:06 +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
lucasgarfield
3493772672 V1 Wizard: Add search parameter for release selection
Adding an optional search parameter to the 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.
2024-03-01 17:33:08 +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
Amir
5b662a39ea Blueprints: add blueprint out-of-sync alert 2024-02-28 13:04:40 +01:00
Ondrej Ezr
627f953dfc feat(HMS-3341): pass module_hotfixes flag to compose request 2024-02-28 12:41:20 +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
Anna Vítová
45194fa225 feat(HMS-3515): Change blueprint cards to be clickable 2024-02-27 18:21:41 +01:00
mgold1234
d8c657da6c feat(HMS-3567): fix cleanup of Reource Group
this commit clean the resource group when user clean the source field
2024-02-27 15:17:53 +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
regexowl
d834099a9b ImagesTable: Replace null with an empty string in ClipboardCopy
ClipboardCopy component doesn't like null anymore so this replaces it with an empty string.
2024-02-27 10:37:17 +01:00
regexowl
362cf6abee Wizard: Re-enable custom repositories HMS-3637
This reverts the changes made to disable custom repositories in the Create Image Wizard.

Reverting following PRs:
- https://github.com/osbuild/image-builder-frontend/pull/1590
- https://github.com/osbuild/image-builder-frontend/pull/1594
- https://github.com/osbuild/image-builder-frontend/pull/1595
2024-02-19 20:54:45 +01:00
Thomas Lavocat
f83fd51468 wizard/oscap: kernel and services customizations
This commit ports the work done on 40b1d4de to the V1 wizard.
2024-02-15 11:30:21 +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
regexowl
d26cecdedb Wizard: Remove aspect ratio for chart
This removes the aspect ratio for chart and sets `maintainAspectRatio` to false.

The aspect ratio was causing problems with the annotation plugin, rendering the currentDate annotation line in a wrong place for some windows sizes.
2024-02-09 17:56:34 +01:00
regexowl
948f8ae3ab Wizard: Fix dates in Release Lifecycle text on the Review step
This updates the dates shown in the description text for the Release lifecycle on the Review step.
2024-02-09 15:07:13 +01:00
mgold1234
07cfaf2ccf feat(HMS-3566) V2Wizrd: fix titles at aws step 2024-02-09 11:47:18 +01:00
Amir
97a75e0465 feat(HMS-3392): add blueprint's version in image table 2024-02-08 07:35:18 +01:00
Amir
13ca8e868d feat(HMS-3431): add a blueprint build images 2024-02-07 17:58:13 +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
Ondrej Ezr
c447244c8a Blueprints: add Blueprints filtering
Enables Blueprints filtering.
Given this is a server side filtering, it also ads Debounce hook.
This hook enables delay the API request to save server roundtrips.

Refs HMS-3389
2024-02-02 14:52:46 +01:00
Anna Vítová
1be52727c7 feat(HMS-3390): Add delete button in the dropdown menu to delete a blueprint 2024-02-01 10:48:11 +01:00
Jakub Rusz
22d8eb6634 Fix osbuild pages url
It's now lowercase.
2024-01-31 12:11:04 +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
Jakub Rusz
d6773fbae1 Update architecture url 2024-01-29 10:20:43 +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
regexowl
6d6e9305d6 Wizard: Temporarily disable Recreate for images with custom repositories
This temporarily disables recreating images containing custom repos.

Changes were marked with "Temporarily disable" and "REMOVE" comments to make the revert easier.
2024-01-25 14:52:27 +01:00
regexowl
0435a50d4d Wizard: Temporarily disable custom packages search
This temporarily disables custom packages search and adds an alert to the step.
2024-01-25 14:34:29 +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