Commit graph

794 commits

Author SHA1 Message Date
mgold1234
174e37531c V2Wizard: add unit test to Azure step 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
61c575c42e test: Up timeout for 'image name invalid for more than 63 chars'
This increases the timeout of 'image name invalid for more than 63 chars' to 20000.
2024-02-22 12:55:29 +01:00
regexowl
97170fb98f test: Re-enable repositories step
This reverts:
- https://github.com/osbuild/image-builder-frontend/pull/1593
2024-02-19 20:54:45 +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
lucasgarfield
d4c9534ecc V2Wizard/Details: Add request assertion tests
Adds tests to verify requets for images with names and descriptions are
formulated correctly.

Test functions shared/common to multiple steps were extracted to the
test utilities.
2024-02-15 13:10:34 +01:00
lucasgarfield
ef7582a8ff V2Wizard/Tests: Add new helper function interceptBlueprintRequest
The logic for spying on an API request has been extracted into a new
reusable helper function to make writing tests that need to perform
request assertions easier.
2024-02-15 13:10:34 +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
Anna Vítová
04e02b9426 api: update image builder api via npm run api 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
c9e124b8c1 test: Enable tests
This enables test for the Repositories step.
2024-01-26 14:04:56 +01:00
regexowl
c2363e3046 test: Add content test suite to V2Wizard
This adds disabled CreateImageWizard.content.test.tsx test suite to the V2Wizard.
2024-01-26 14:04:56 +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
7c40ca1b77 test: Enable blueprint description test
This enables a description check in the V2Wizard testing suite.
2024-01-25 16:30:32 +01:00
regexowl
27b4e226d0 ESLint: Add no-debugging-utils rule
This adds `testing-library/no-debugging-utils` rule to output an error when a debugging statement was left over in the code.
2024-01-25 15:23:57 +01:00
regexowl
269293e181 test: Remove debugging statement and change getBy query to findBy
This removes a leftover debugging statement and changes `getBy` query to an awaited async `findBy` as this was causing problems in the test when the checked component wasn't immediately available.
2024-01-25 14:57:09 +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
regexowl
28468c7af6 test: Disable repositories tests
This disables all tests testing behaviour of the Repositories step.

All instances were marked with the "Temporarily disable" comment to make the complete revert easier in the future.
2024-01-25 13:53:27 +01:00
regexowl
d9d4cb02e4 test: Re-enable content testing suite
This renames CreateImageWizard.content to CreateImageWizard.content.test.js, re-enabling the testing suite.
2024-01-25 13:53:27 +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
Amir
017f5bfb51 feat(HMS-3391): add blueprint onclick handler 2024-01-25 09:28:34 +01:00
lucasgarfield
0f75f4862a Tests: Disable repository related tests
Disable tests related to custom repos temporarily while that feature is
unavailable.
2024-01-24 21:13:09 +01:00
lucasgarfield
48da0a79ec Wizard: Enable unavailable message for repositories
Repositories will be unavailable for the next few days.
2024-01-24 21:13:09 +01:00
lucasgarfield
531369276c ImagesTable: Add error state
It is important we have an error state for times that we may need to
bring the image builder service down for whatever reason.
2024-01-24 20:09:42 +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
lucasgarfield
46ac78b1de api: update image builder api via npm run api
There have been some recent updates to the /experimental/ routes related
to blueprints, this commit pulls them in.
2024-01-22 15:31:33 +01:00
lucasgarfield
819863835b LandingPage: Hotfix to remove exposed blueprint buttons
Commit bae6435fd9 adds scaffolding for the
blueprint table. Blueprint features should be hidden behind experimental
flags. The new buttons related to creating blueprints and rebuilding
images in the header were not hidden behind the experimental flag, this
commit fixes that and does so.

bae6435fd9 also changed the header title
from "Image Builder" to "Images". This change has been a long time
coming - it is being left in for now. We may want to revisit the copy in
the popovers to align it as the term "Image Builder" is still being used
in those.
2024-01-22 10:06:40 +01:00