Commit graph

21 commits

Author SHA1 Message Date
lucasgarfield
698037a7dc V2Wizard: Uncomment relevant GCP tests and add data-testids
The tests have not been modified at this point, only uncommented, so the
next commit will have a clear diff.

Some data-testids were added to radio selectors and the Google principle
input as well for use in the tests.
2024-01-15 16:42:28 +01:00
lucasgarfield
5a3726a4c8 V2Wizard: Update GCP validator and state management
The e-mail validator now requires a domain.

Switching from 'withGoogle' to 'withInsights' now sets the other GCP
related options to 'undefined' in order to keep the store state such
that it accurately reflects the current wizard state.

This is done in the reducer, not via a listener. That is a bit
inconsistent with the current listeners in place but this is an evolving
design and the inconsistency is acceptable for now. We may either accept
it, move the reducer actions here into listeners, or move the existing
listeners into reducers at some point in the future.
2024-01-15 16:42:28 +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
e5c55828e3 V2Wizard: Copy <AwsSourcesSelect> and convert to Typescript
No changes made, file simply copied so future commits have clear diffs
when dropping DDF.
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
f41f3c51b7 V2Wizard: Add <CentOSAcknowledgement> to Target Output step
The state from RTK is now used to determine whether or not to display
the CentOS acknowledgement.
2024-01-08 11:59:23 +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
a3ef0cc2f7 V2Wizard: Add <TargetEnvironment> to Image Output step
DDF has been dropped from `<TargetEnvironment>`, state is managed with
RTK.
2024-01-08 11:59:23 +01:00
lucasgarfield
937219ba51 V2Wizard: Add <ArchSelect> to Image Output step
This commit drops the DDF dependency from the `<ArchSelect>`.
2024-01-08 11:59:23 +01:00
lucasgarfield
1f38ce5187 V2Wizard: Add <ReleaseLifecycle> to Image Output step
The `<ReleaseLifecycle>` component has dropped DDF and now uses RTK.
2024-01-08 11:59:23 +01:00
lucasgarfield
ad2bd7a31a V2Wizard: Add <ReleaseSelect> to Image Output step
The `<ReleaseSelect>` component now uses RTK instead of DDF. Some
additional small changes  were necessary due to Typescript - in
particular, we use a Map() to store the releases (in order to ensure
they appear in the correct order) and .tsconfig had to be modified to
allow iteration over the Map() object.
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
b446f1d1e4 V2Wizard: Copy components needed for image output step
The components for the architecture select, centos acknowledgement,
release select, and target environement have been copied and converted
to Typescript files. When these files are modified in future commits,
the result will be a clean diff where all changes made are obvious.
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
regexowl
3e07472826 Wizard/ImagesTable/test: Change "VMWare" to "VMware"
The "w" in VMware should be lower case, this updates it in all places.
2023-12-05 13:20:42 +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