Commit graph

32 commits

Author SHA1 Message Date
Andrew Dewar
3231b324f0 HMS-3796: Add snapshot date selection to wizard 2024-04-25 14:45:50 +02:00
lucasgarfield
ddca8d7430 V2 Wizard: Disable back on first step (HMS-2781)
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.
2024-04-23 14:23:59 +02:00
Ondrej Ezr
709ae39d23 WizardV2: Validate steps through redux state
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.
2024-04-18 10:01:06 +02:00
regexowl
155962c141 ESLint: Resolve useSelector-prefer-selectors errors
This resolves all occurences of useSelector-prefer-selectors errors.
2024-04-02 20:21:34 +02:00
Michal Gold
698d21df42 V2Wizrad: fix validation at file system step (HMS-3733)
this commit fix validation when usr choose duplicate mount point
andwhen there is no root partition
2024-04-02 15:25:37 +02: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
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
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
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
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
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
mgold1234
f77cc39135 V2Wizard: add all necessary components 2024-02-28 12:10:00 +01:00
Amir
74f71f2dca Blueprints: Add handler for creating new blueprint 2024-02-12 15:12:14 +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
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
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
lucasgarfield
d26a7658db V2Wizard: Fix wizard initializeWizard action
Fixes #1552.

The wizardSlice's initializeWizard action was not working because when it
was passed to `dispatch()` as an argument it was missing the `()`...
oops!

It also needs to be dispatched inside of a useEffect hook with an empty
dependency array so that it is only dispatched once, when the wizard
opens.
2024-01-16 17:23:22 +01:00
lucasgarfield
7c8cfe7f63 V2Wizard: Add <Gcp> step
`<Aws>` state is now managed with RTK instead of DDF.
2024-01-15 16:42:28 +01:00
lucasgarfield
9953207d25 V2Wizard: Refactor Aws step
We encountered a number of bugs with the previous implementation where
going to the next or previous step and returning to the AWS step
resulted in incorrectly displayed information about the selected source,
etc...

All state that needs to be available during the entire wizard life cycle
has been moved to RTK.
2024-01-11 09:22:18 +01:00
lucasgarfield
091c34431e V2Wizard: Implement <Aws> subset of Image Output step
DDF has been dropped, RTK being used for state management now.
2024-01-11 09:22:18 +01:00
lucasgarfield
f778b5431c V2Wizard: Create foundation for Target Environments substep AWS
Substep for an AWS target environment created in wizard, component to
follow in subsequent commit.
2024-01-11 09:22:18 +01:00
lucasgarfield
779416785f V2Wizard: Correctly enable/disable Next button for Image Output step
The 'next' button is now disabled if no target environments are selected
on the Image Output step.
2024-01-08 11:59:23 +01:00
lucasgarfield
2465ab4b84 V2Wizard: Add <ImageOutput> skeleton
Adds the foundation for the image output step.
2024-01-08 11:59:23 +01:00
lucasgarfield
bb6bf51068 V2Wizard: Add <CreateImageWizard>
Adds the scaffolding for the V2 wizard, only empty Image output and
Review steps present at this time.
2024-01-08 11:24:54 +01:00
lucasgarfield
e1f66dd444 V2Wizard: Clean up for a fresh start
To make code reviews easier, these files are being removed for now. They
will be added back over time in a way that results in clearer diffs.
2024-01-08 11:24:54 +01:00
Thomas Lavocat
2173545f60 wizard/review: add the review step
Bring in a review step in the wizard. The purpose is to incrementally
develop it while new steps are added to the mix. This way the Wizard
gets to be integration testable from the early beginning.

Right now the review step is only showing information about the Image
Output step. Even though the Image Output step contains data about the
target environment, these information are going to need the Target
Environment step to be developed in order to be fully shown.
2023-11-14 09:33:36 +01:00
Thomas Lavocat
9c78456c57 wizard/image_output: add the image output step
Port the image output step to the new wizard v2.

This is also the first step in the new redesigned wizard and this commit
message is an opportunity to detail a bit the organisation of it:

The code is organised as followed:
- CreateImageWizard is the root and contains all the code associated
  with the PF wizard. (i.e Wizard and WizardStep).
- Each step has its code under the step/ sub directory.
- The step directory is named after the step (i.e ImageOutput for the
  Image Output step
- At the root of the step directory there is a file which contains the
  code of the step (i.e ImageOutput.tsx).
- The main component of the step can access many subcomponents and they
  have to be stored alongside it in its directory.

State management:
- The state management is only done with react use states, prop drilling
  and state lifting. This is to ensure simplicity as it makes the wizard
- If necessary in the future, there might be needs for context and
  reducers, but it's quite not the case RN. And using them come at the
  cost of making exploring the code harder.
- CreateImageWizard will declare all the states
2023-11-14 09:33:36 +01:00
Thomas Lavocat
9a1b823eed wizard: prepare a dev env to create the new wizard
Developing a new wizard will require many pull requests and some of them
might even be worked on in parallel. To allow to develop all of that
without interfering with the legacy wizard this commit introduces a new
dev environment alongside an unleash flag when we later want to do the
switch.

To use the new dev en use `npm run stage-beta:experimental` or `npm run
stage-beta:msw+experimental` depending on what you want.

Then unleash flag to toggle in stage and prod is: `image-builder.new-wizard.enabled`

fixes: HMS-2859
2023-11-09 12:43:01 +01:00