Commit graph

39 commits

Author SHA1 Message Date
Sanne Raymaekers
1b9cf6df7b src: Remove SmartComponents/PresentationalComponents split
Just have a directory per component.
2021-04-22 10:23:51 +02:00
Jacob Kozol
fcc5b62def CreateImageWizard: add description
The wizard now contains a subtitle/description which includes a link to
documentation.
2021-04-20 16:24:50 +02:00
Jacob Kozol
f3eed9c28f store: implement compose start action/reducer
When a compose is started the api call is no longer handled by the
CreateImageWizard onSave function. Instead, the CreateImageWizard
calls the composeStart thunk. This function calls the api and handles
the response. If successful, the compose is added to the store.
Otherwise, an error is added to the store.

The store's compose object now has a list of the compose ids and an
object containing key/value pairs mapping a compose id to the compose
for all composes. This "normalized" state will allow more efficiency
when selecting individual composes or iterating through all composes.

The compose objects in the store now match the composeRequest object
instead of having a shape unique to the UI. This can be changed in the
future if image-builder's api returns compose objects of a different
format.

Tests are updated for new compose format and action/reducer types.
2021-04-19 15:04:26 +02:00
Jacob Kozol
fbada9d990 store: rename updatecompose to compose updated
Our compose actions will follow the naming convention of *name*_*event*.
Therefore, when we receive an updated compose from the api, the action
should be called COMPOSE_UPDATED.
2021-04-19 15:04:26 +02:00
Sanne Raymaekers
28cc248335 CreateImageWizard: Move steps into separate components 2021-04-14 17:34:30 +02:00
Jacob Kozol
01c5a5f202 store: refactor redux hierarchy
The redux reducers and actions are moved to subdirectories within the
store directory. The goal of this is to improve the understandability of
the directory structure and to prepare for future scaling of the actions
and reducers.
2021-04-13 20:55:34 +02:00
Jacob Kozol
f00cf08506 CreateImageWizard: add registration validation
If register now is selected, an activation key is required. If no
activation key is entered the Next and Create buttons are disabled.
Also, if the activation key is empty an error message will appear to
prompt the user to enter an activation key.

The subscription errors variable is removed in favor of declaring the
error message directly in the registration step component. The
validateSubscription function is removed in favor of validating the
activation key field on change.
2021-03-23 18:34:27 +01:00
Jacob Kozol
6d147c95fc CreateImageWizard: default to register the image later 2021-03-23 18:34:27 +01:00
Chloe Kaubisch
a686fd970b CreateImageWizard: single upload_request
Change imageRequest to accept a single uploadRequest instead of
an array of uploadRequests.
2021-03-22 12:04:48 +01:00
Jacob Kozol
f268441d41 CreateImageWizard: validate upload destination
The user should not be able to continue without selecting an upload
destination. The uploadDestination fields are now checked to see if one
is selected before enabling the Next button in the footer. Also, the
onSaveInProgress variable is changed to isSaveInProgress to conform with
the other validation variables.
2021-03-15 14:37:27 +01:00
Sanne Raymaekers
b0614ae750 CreateImageWizard: Notification on successful compose response 2021-03-09 21:41:17 +00:00
Sanne Raymaekers
ef0f5e4a8d CreateImageWizard: Move footer to custom component
Adds an error message in some error cases.
2021-03-09 21:41:17 +00:00
Sanne Raymaekers
c325a310a2 ImagesTable: Instead of the image type show the upload target
Fixes #105
2021-03-08 13:33:46 +00:00
Sanne Raymaekers
398eeb8cb2 CreateImageWizard: Add Azure upload step 2021-03-08 10:03:04 +00:00
Sanne Raymaekers
f3887a1d42 CreateImageWizard: Fix google image type
Image type gcp doesn't exist, it should be vhd.
2021-03-05 16:54:40 +00:00
Sanne Raymaekers
76108cb701 CreateImageWizard: Fix google share options
This needs to be an array of strings.
2021-03-05 16:38:36 +00:00
Jacob Kozol
22385fd5ea CreateImageWizard: add google upload step
The user can now specify their authentication settings for Google Cloud
Platform. These can be either a Google account, Service account, Google
group, or a domain.
2021-03-05 16:21:08 +01:00
Jacob Kozol
43e87a184d CreateImageWizard: update review page
The review page now uses more patternfly components and has been split
up a little so it is easier to add review fields for additional target
environments.
2021-03-01 17:01:58 +01:00
Sanne Raymaekers
60589dd2c1 CreateImageWizard: Add selected packages to compose request 2021-02-24 20:28:37 +01:00
Jacob Kozol
6b575c5478 CreateImageWizard: add package step
The additional package selection step is added to the create image
wizard. Users can now query for packages and select them from a list.
These packages are not yet passed into the blueprint customizations and
are just for display. Tests have been updated and added.
2021-02-24 18:50:02 +00:00
Jacob Kozol
5e81d5daf9 CreateImageWizard: support multiple upload providers
The user can now select between multiple upload providers. AWS, Azure,
and Google. The selection uses tiles and the user can select one or more
destinations. Currently, only aws supports setting the upload
parameters.

The icons point to files hosted on cloud.redhat.com.
2021-02-19 12:10:57 +01:00
Sanne Raymaekers
005c0d783a CreateImageWizard: Set initial status correctly 2021-02-18 00:44:05 +00:00
Sanne Raymaekers
0a575399c1 CreateImageWizard: Change image type to ami
Once we have multiple image types we need to make this dynamic based on
upload type. But qcow2 doesn't work under any circumstance so let's use
ami.
2021-02-05 12:28:14 +01:00
Jacob Kozol
b17d9b5325 CreateImageWizard: display in modal
The wizard now displays inside a modal.
2021-02-04 17:19:02 +01:00
Jacob Kozol
d66ef828f8 CreateImageWizard: remove isInPage
The isInPage wizard property was causing console errors in both the
browser and the tests.
2021-02-04 17:19:02 +01:00
Sanne Raymaekers
5adb8b581e CreateImageWizard: Only ask for aws account id in upload step 2020-12-18 11:46:01 +01:00
Jenn Giardino
4cbd745ec5 Removes stack layout from wizard 2020-12-17 11:36:29 +01:00
Jenn Giardino
5463af8cd6 Adds a Stack layout to have the wizard footer visible
TLDR; before this update the user always has to scroll to get to
the footer actions in the wizard.

There's a weird nested page section thing happening which results
in the wizard body+footer being 100% of the height of the main content
area, but when you add the wizard header as a separate section above
the 100% height wizard body+footer, the header pushes the wizard
contents down so that the bottom portion of the wizard (equal to the
height of the header, and roughly the height of the footer) is always out
of view. This means that the user always has to scroll to get to the
footer.
2020-12-16 11:39:29 +01:00
Jenn Giardino
142674b43b components: Moves wizard steps into separate files
Replaces the flex layout in Review step with more semantic `<dl>`
elements.

Be more compliant with designs.
2020-12-10 14:45:32 +01:00
Sanne Raymaekers
3763457b8e package.json: Update major versions of react and patternfly 2020-11-27 11:35:23 +02:00
Sanne Raymaekers
33e9db6681 tests: More updates
- `npm run test:single` runs jest with `-w 1`, makes the output readable
- adds testIds to the radio buttons, I think it's a bit bugged where if
  you click the label it'll automatically switch to the first radio button
  (even if you click the label of the 2nd button)
- moved a misplaced wait
2020-11-18 16:38:23 +02:00
Aleksandar Todorov
7c6ebd9d6f Pass props.upload.options instead of null
this fixes CI failure exposed in the previous commit
2020-11-18 16:38:23 +02:00
Aleksandar Todorov
44fecec797 Add tests switching between fields in AmazonUploadComponent 2020-11-18 16:38:23 +02:00
Aleksandar Todorov
f01568c263 Add more test automation. Refs #40
- Make activation key input field required

- Registration step in CreateImageWizard
  - should allow choosing activation keys
  - should hide input fields when clicking Register the system later
2020-11-12 10:59:47 +01:00
Sanne Raymaekers
a39304a3ba eslint: jsx-tag-spacing and jsx-closing-bracket-location rules 2020-11-09 18:25:51 +01:00
Aleksandar Todorov
afe02e0f2e Add more tests for Create Image Wizard
- sanity validation of each of the 4 steps
- click through buttons Next/Back/Cancel

Notes:

- add data-testid attribute for the release select field b/c
there's no better way to query it
- add @testing-library/jest-dom for additional asserts
2020-11-09 10:52:33 +01:00
Aleksandar Todorov
dbc702575a Make base-url https and add missing // 2020-11-03 16:49:12 +01:00
Major Hayden
404a80e59c 📦 Denote AWS image as raw
We had issues in composer a while back with VHDX in AWS and we have been
using raw images since then.

Signed-off-by: Major Hayden <major@redhat.com>
2020-09-22 15:55:08 +02:00
sanne raymaekers
001e53a733 components: Move image creation to PF4 wizard 2020-09-09 15:31:10 +02:00