Commit graph

314 commits

Author SHA1 Message Date
lucasgarfield
70c232471a ImagesTable: Change 'beta' to 'preview' in Launch popover 2023-05-05 11:46:11 +02:00
lucasgarfield
675a676709 ClonesTable: Remove Instance column
The instance column is no longer in the clones table per the latest
designs.
2023-05-05 10:38:20 +02:00
lucasgarfield
eb3a702c68 Wizard: Prefetch data for external API calls
This makes the wizard feel much 'faster' for a better user experience.
The implementation uses RTK Query for prefetching. For most API
requests, prefetching is done when the 'next' button is hovered over on
the previous step.
2023-05-05 09:17:59 +02:00
regexowl
83206171f9 ImagesTable: Ensure created_at date for a new image
This adds a temporary value of current date to `created_at` for newly created images.

This is not the most elegant solution and will be reworked after the ImagesTable refactor.
2023-05-04 17:09:47 +02:00
lucasgarfield
f1f544daec Wizard: Make AWS sources select scrollable in modal
There is a bug in Patternfly that causes 'pop out' selects (those that
use the menuAppendTo="parent" prop) to be rendered underneat the wizard
footer.

Until this is patched in Patternfly, we will have to live with
suboptimal select menus that scroll inside the modal.
2023-05-04 16:34:43 +02:00
regexowl
c581903745 Wizard: Disable "Add all" button when there's an exact match
This disables the "Add all" button in the `DualListSelectorControl` on the Packages step when there's too many results to display, even if there's an exact match.
2023-05-04 14:49:27 +02:00
lucasgarfield
05b411c241 Wizard: Add 'Refresh' button to repositories step
Users may visit the Repositories service to add or modify repositories
while they are on the repositories step in the wizard. This commit adds
a 'Refresh' button that will refetch the repositories and update the
table so that the user does not have to restart the wizard to view their
modifications.
2023-05-04 14:13:17 +02:00
lucasgarfield
383f2a6855 Wizard: Add filtering to repositories
This commit adds filtering based on architecture and version to the
repositories table in the wizard.

Apart from filtering, this commit now shows *all* repositories,
regardless of their status. Previously, invalid repositories were not
displayed. A future PR will add a status column and edge case handling
(how to handle an invalid repo, etc...). For now, invalid repos are
displayed and can be selected.

RTK Query is now used to manage the state of the repositories.
Previously, the repositories were fetched in a useEffect hook upon
opening the wizard.

MSW is now used instead of jest mocking for the tests involving
repositories. The repositories test fixture now contains a function that
mimics the content sources API.
2023-05-04 14:13:17 +02:00
Pavel Odvody
93d1f94c79 Remove embedded quickstarts & Preview
With our quickstarts now merged to prod we can
start using the quickstart API to invoke them.
Also change all Beta user facing text to Preview

Signed-off-by: Pavel Odvody <pavel@redhat.com>
2023-05-03 15:25:48 +02:00
regexowl
f39903841b LandingPage: Update spacing in expendable quickstart area
This updates spacing between the description and buttons as shown in mocks.

Nesting of the `<p>` tags was also removed to eliminate `Warning: validateDOMNesting(...): <p> cannot appear as a descendant of <p>` from the console logs.
2023-05-03 13:13:02 +02:00
Sanne Raymaekers
23d58d563d CreateImageWizard/Repositories: set custom-repositories
Embed the payload repositories into the image.
2023-05-02 14:33:53 +02:00
Sanne Raymaekers
f0679d1196 CreateImageWizard: rename custom- to payload-repositories
To avoid confusion between custom and payload repositories.

Custom repositories will be embedded in the yum config, payload
repositories are used for installing packages.
2023-05-02 14:33:53 +02:00
lucasgarfield
7bca4c7438 LandingPage/ImagesTable/Wizard: Remove all insights global calls
This commit replaces all calls to the insights.chrome global with calls
to the useChrome() hook (or the useGetEnvironment() custom hook that
wraps useChrome()).
2023-04-28 17:07:31 +02:00
lucasgarfield
b2e6e3cf04 Wizard: Use useChrome hook to set beta feature flag
The use of chrome.isBeta is deprecated, the useChrome hook should be
used instead to obtain an isBeta() function. Using the deprecrated
chrome.isBeta pollutes the browser console with warning messages.

This commit replaces the isBeta() helper function with a new custom
hook, useGetEnvironment().

We still sometimes need to know which environment is running outside of
React components, where we cannot call the useChrome() or
useGetEnvironment() hooks. For instance, in the json used to define a
wizard step. Therefore a new isBeta variable has been added to the
form's initialState for use in these cases.
2023-04-28 17:07:31 +02:00
regexowl
79fe46474a Wizard: Update text on Packages and Additional Red Hat packages steps
This removes unnecessary sentences from the description of Packages and Additional Red Hat packages steps. The min and max height of the `DualListSelector` was also updated.
2023-04-26 18:24:28 +02:00
Jakub Rusz
b17f18ddf8 Add ouiaID for resource group select 2023-04-26 13:17:29 +02:00
regexowl
a97cfd229a Quickstarts: Add check for the last step of AWS and Azure
This adds the "Check your work" review for the 3rd step of AWS and Azure.
2023-04-25 13:05:00 +02:00
regexowl
031fd08b91 ImagesTable: Add popovers with error details for failed builds
This removes error details from the image detail and moves them to popovers activated by clicking on "Image build failed" status.

Popovers were also added for clones which didn't include any error details previously.
2023-04-25 11:20:34 +02:00
regexowl
dc8e521e28 LandingPage: Change background of "Help get started with beta features"
This changes the background color of the "Help get started with beta features" expandable from #FAFAFA to #FFFFFF.
2023-04-24 13:02:55 +02:00
lucasgarfield
3d4b9287df Quickstarts: Fix minor bugs 2023-04-21 16:41:24 +02:00
lucasgarfield
d06f929227 LaunchWizard: Add large variant prop to set width of wizard correctly
Without this prop, the wizard's width expands to fill the entire window.
2023-04-21 12:22:30 +02:00
Pavel Odvody
2f13390eee Add MODAL_ANCHOR and anchor ShareImageModal
This patch adds a constant `MODAL_ANCHOR` so that the value
can be used in multiple modals that require it. Also the
ShareImageModal is now properly anchored to it.

Signed-off-by: Pavel Odvody <pavel@redhat.com>
2023-04-20 17:02:04 +02:00
Pavel Odvody
b0a7456860 Use custom modal to show the wizard
So that it's anchored to proper element via `appendTo`

Signed-off-by: Pavel Odvody <pavel@redhat.com>
2023-04-20 17:02:04 +02:00
Pavel Odvody
45547c607b Ensure Launch wizard is anchored to proper element
By default modals are anchored to document.body which inteferes
with quickstarts

Signed-off-by: Pavel Odvody <pavel@redhat.com>
2023-04-20 17:02:04 +02:00
Pavel Odvody
466f158374 Anchor modal to proper element
By default all modals are anchored to document.body
which interferes with Quickstarts by overlaying them.
This patch anchors the modal to the main element outside
of the Quickstart so that both can be visible at the same time.

Signed-off-by: Pavel Odvody <pavel@redhat.com>
2023-04-20 17:02:04 +02:00
Pavel Odvody
8fced39451 Show different alert to user in beta
This adds the possibility to invoke 3 different quickstarts
from in-beta prompt

HMS-1577

Signed-off-by: Pavel Odvody <pavel@redhat.com>
2023-04-20 17:02:04 +02:00
lucasgarfield
bc1435994d Router: Modify /share and /imagewizard routing
Insights offers 'quickstarts', which can be used to provide
mini-tutorials in a sidebar.

Unfortunately, these quickstarts change our URL... they add an optional
query parameter related to the quickstart. The process of doing so
destroys our router's `location`, setting it to undefined.

We have been using the location state to store the GUID of the image,
needed when opening the wizard via the `Recreate image` action or when
opening the share modal.

As a workaround, we can simply accept that the quickstarts will change
our URL and destroy our router's location. Instead, we now put the image
id (its UUID) in the route itself. We can access it in the components as
necessary via the useParams hook.
2023-04-20 14:59:12 +02:00
Lucas Garfield
0870ea7d55
ImagesTable: Fix bug where Launch link incorrectly displayed (#1085)
This commit fixes a bug where the Launch link (which opens the
Provisioning wizard) was incorrectly displayed for all image types.

The bug is currently in production beta, so this commit is needed for
the hotfix. Changes made are minimal, only what is necessary to fix the
bug - we still need to discuss the getImageProvider() function (the
original source of the bug) with the Provisioning team.
2023-04-19 10:53:26 +02:00
regexowl
8f87626dfb Wizard: Fix unavailable key information error
When creating a new image and selecting an activation key on the Registration step the warning about unavailable key information is displayed even though the key information is loaded without any problems.

This shows the error on the Registration step only when fetching the activation key information ends in error.
2023-04-19 08:20:03 +02:00
Sanne Raymaekers
38dda9da67
CreateImageWizard: support verifying repository metadata (#1076) 2023-04-18 13:45:23 +02:00
regexowl
e5a9f0eaf9 Wizard: Add "refine search" warning to Packages step
Fixes #913.

This adds status bars to the `DualListSelectorPane` on the Packages step. The status bar indicates how many packages were found and how many of those have been selected.

Warning for too many returned results was also added. When an exact match is found during a search with over 100 results, it is shown together with the warning.
2023-04-14 18:27:10 +02:00
Sanne Raymaekers
c3c8a687a0 LandingPage: add "go to beta" banner 2023-04-14 17:36:31 +02:00
Sanne Raymaekers
341b37a567 ImagesTable/RegionsPopover: add "go to beta" under launch 2023-04-14 17:36:31 +02:00
regexowl
5f99bc79cf Wizard: Migrate activation keys calls to RTK Query
This migrates calls to RHSM endpoints `activation_keys` and `/activation_keys/{name}` to RTK Query.

Tests were also updated to use Mock Service Worker instead of previous Jest mock function.
2023-04-14 16:52:47 +02:00
regexowl
02a584b36f Wizard: Remove prop validation for ReviewStepTables and ReviewStepTextLists
This removes prop validation that was left behind after the props were removed during a Review step updates PR review.
2023-04-14 12:12:38 +02:00
Ondrej Ezr
dcb1e23298 Always enable launch for AWS 2023-04-14 11:59:18 +02:00
regexowl
876e605a23 Wizard: Ensure unique IDs for buttons
Fixes #1065.

This sets buttons on the Repositories and Additional custom packages steps to `CustomButtons` to ensure buttons in each of the steps have a unique ID.
2023-04-13 13:58:16 +02:00
Ondrej Ezr
065900c0f8 Add sources selection for Azure
Fixes HMS-1511
2023-04-13 13:32:23 +02:00
lucasgarfield
c7add821c2 Wizard: Fix bug causing crash upon visiting Azure step
This commit fixes a bug in the wizard. The Azure step name was
incorrectly set when using the 'Recreate image' option which caused the
wizard to crash when trying to access the Azure step.
2023-04-12 16:33:19 +02:00
Ondrej Ezr
451b5784d5 Send upload info to ProvisioningWizard 2023-04-07 10:48:06 +02:00
regexowl
4405d2ddd2 Wizard: Disable remove button for the root partition
Fixes #910. This disables the remove button and select for the root partition as that one is required to continue with creating an image.

The third point mentioned in the issue is removing mount points that have already been chosen from the dropdown to prevent adding duplicate mountpoints.

This point was not implemented as we need to allow the user to create multiple sub directories under the same mount point if needed.
2023-04-04 18:05:53 +02:00
Sanne Raymaekers
1df2df1360 CreateImageWizard: show error details on save
Show details when the wizard sends a request that results in an
error. Now that AWS and Azure have a maximum size, this needs to be
shown.
2023-04-03 10:51:54 +02:00
regexowl
87dc7f8440 Wizard: Update links on File system configuration step
Fixes #1023. This updates the links on the File system configuration step.
2023-03-29 14:28:13 +02:00
Ondrej Ezr
78bc71fe6a Allow launch wizard for Azure images 2023-03-29 12:11:14 +02:00
Jakub Rusz
9637a86351 Set ouiaId for activation key Select widget 2023-03-29 12:05:19 +02:00
lucasgarfield
4c2a410dd7 Wizard: Expose beta features in qa environment
The QE team has requested that all beta features be exposed in the
ephemeral environment (insights.chrome.getEnvironment() === 'qa').
2023-03-28 09:26:13 +02:00
regexowl
254ba7afac Wizard: Update the Review step to have expandable sections
Fixes #919.

This updates the Review step as per proposed mocks.

The tabs were replaced by expandable sections containing all the information relevant to a specific step.
2023-03-27 10:35:17 +02:00
Sanne Raymaekers
808d8b8452 CreateImageWizard/Registration: remove extra rhc/insights vars
They just complicated the logic, might as well rely on the form api
value.
2023-03-13 13:48:43 +01:00
Sanne Raymaekers
9d0448979d CreateImageWizard: fix plain list styling
The list styling should only apply to unordered lists (present on the
review page).
2023-03-13 13:48:43 +01:00
Sanne Raymaekers
7635bda168 CreateImageWizard/Registration: refine tooltip texts 2023-03-13 13:48:43 +01:00