Commit graph

330 commits

Author SHA1 Message Date
regexowl
5c8a08f45c ImagesTable: Add image details and update ClonesTable
This adds expandable rows details for each image and updates ClonesTable according to the new mocks.
2023-06-14 16:07:27 +02:00
Djebran Lezzoum
f332dff5b9 edgeImageDetails: Implement manage edge image details page.
In the context of HMS parity stage 1, implement federated manage edge image page at route manage-edge-image.
2023-06-13 20:46:37 +02:00
lucasgarfield
b73b0ecd56 Wizard: Enable Azure and GCP provisioning links in ephemeral
Unleash is being used to determine whether or not to use the Launch
wizard for Azure and GCP images. Unleash is not yet supported in our
ephemeral environments, but we want our ephemeral environments to have
parity with beta. This commit ensures that the Launch wizard opens for
Azure and GCP images in ephemeral.
2023-06-09 15:59:44 +02:00
lucasgarfield
0fe9770bc3 Wizard: Hotfix for recreate image rate limiting issue
Related to HMS-1886: Clicking the recreate button on a build with a lot
of packages results in the user being rate limited.

Package summaries are obtained by querying the Content Sources API. A
large number of packages requires a large number of requests and leads
to the rate limiting problem when using the 'Recreate image' function.

This commit fixes the problem by not requesting or displaying package
summaries when 'Recreate image' is used. (Note that newly added packages
will still request and display a summary.)

The 'Recreate image' function will soon be replaced by
blueprints. This hotfix should carry us forward until then.
2023-06-05 17:49:18 +02:00
Klara Simickova
6af015f0e0 Revert "ImagesTable: Update ClonesTable"
This reverts commit 2f55648310.
2023-06-01 18:12:08 +02:00
regexowl
2f55648310 ImagesTable: Update ClonesTable
This updates ClonesTable according to the new mocks.
2023-06-01 16:38:49 +02:00
lucasgarfield
2e30d93ea1 LandingPage: Update Open Source Badge
The open source badge now lives in @redhat-insights/frontend-components.
2023-06-01 16:04:14 +02:00
Amir Fefer
38f0b37a6b feat(HMS-776): Add feature flag for gcp provisioning 2023-05-30 14:08:03 +02:00
Sanne Raymaekers
ff50b59126 CreateImageWizard/Registration: use PF4 property names
By using the standard HTML property name, PF4 considered the Radio
uncontrolled. This causes warnings in the console.

By using the correct property names, PF4 correctly considers the
component controlled.
2023-05-30 10:08:44 +02:00
Sanne Raymaekers
fc63aec015 CreateImageWizard: turn off gpg check explicitly
gpgcheck is on by default, and if no gpgkey is specified dnf complains.
2023-05-12 23:07:42 +02:00
lucasgarfield
e8a40e27dc Wizard: Add Azure launch link for images created in preview
If an image does not contain a subscription_id property, the link to
view the image in Azure will be malformed. This happens when a user
creates an Azure image in beta/preview using sources, and then clicks
the 'View uploaded image' link in stable.

Now, if an Azure image was created using sources (as evidenced by presence
of a source_id in request's upload options), the Launch button appears
and its popover has a link to Preview.
2023-05-05 15:22:53 +02:00
regexowl
1fcb1cb4b5 ImagesTable: Fix switch statement in ImageLink
This fixes an erroneous switch statement.
2023-05-05 14:55:17 +02:00
lucasgarfield
56475e9470 Wizard: Fix erroneous switch statement in ImageLink
The switch statement used to determine the image type for the Launch
wizard was written incorrectly, this commit fixes it.
2023-05-05 13:56:41 +02:00
lucasgarfield
fb9b9ca9a6 Wizard: Adjust AWS launch popover for images created in preview
If an image does not contain a share_with_accounts property, launch
links do not appear in the launch popover. This happens when a user
creates an AWS image in beta/preview, and then clicks Launch in stable.

A message is now displayed that explains the image was created using
Preview features, and the link to Preview has been clarified to be more
explicit.
2023-05-05 12:52:27 +02:00
regexowl
d54d347d83 ClonesTable: Remove created_at column from the clones table
This removes the `created_at` column from the clones table as per the latest designs.
2023-05-05 12:26:16 +02:00
regexowl
dde0f195b4 ImagesTable/ShareImageModal: Update sharing options for AWS
This disables sharing to new regions in case of failed build of the parent image.

The regions that always end in failure were also disabled in the `ShareImageModal`.
2023-05-05 12:20:33 +02:00
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