Commit graph

364 commits

Author SHA1 Message Date
Amir Fefer
3a0969e2dd Fix missing aria label in launch wizard modal 2023-08-02 18:27:23 +02:00
regexowl
857257591c Wizard: Disable non-valid repositories and add a Status column
This disables adding of repositories that do not have 'Valid' status.

Status column was also added to the Repositories table to make the reason why the checkbox is disabled visible.
2023-08-02 15:40:57 +02:00
lucasgarfield
13b02eca7e eslint: Add support for Typescript
This commit adds eslint support for .ts and .tsx files.

The recommended Typescript rules are applied only to .ts and .tsx files
and not to existing .js or .jsx files. This is accomplished by creating
a separate .eslintrc-typescript.yml file and pointing to it in the
.eslintrc.yml overrides parameter.

A .eslintignore file was added. This file has syntax similiar to
.gitignore and is used to ignore the programatically generated API
slices so that we do not have to deal with a massive diff whenever we
update one of them.
2023-08-02 13:46:08 +02:00
Thomas Lavocat
deab7f95a9 wizard/registration: cleaning of a useEffect
A useEffect was used without conditions to update the value of a state
variable depending on the form state. That's apparent to a way to
initialize the state. Instead, what can be done, is to immediately
initialize the state at the proper value.
2023-08-01 12:39:21 +02:00
lucasgarfield
834c9d8333 API: Remove /types directory
All Typescript types are now found in the programatically generated API
slices in `/src/store`.
2023-07-28 15:05:08 +02:00
lucasgarfield
702b667dc5 API: Add programatically generated Provisioning API slice definitions
These definitions were generated using the RTKQ code generation tool and
will replace the existing definitions.
2023-07-28 15:05:08 +02:00
lucasgarfield
74528356fa API: Add programatically generated Content Sources API slice definitions
These definitions were generated using the RTKQ code generation tool and
will replace the existing definitions.
2023-07-28 15:05:08 +02:00
lucasgarfield
22df78bffa API: Add programatically generated RHSM API slice definitions
These definitions were generated using the RTKQ code generation tool and
will replace the existing definitions.
2023-07-28 15:05:08 +02:00
lucasgarfield
1894a9dcb2 API: Add programatically generated Image Builder API slice definitions
These definitions were generated using the RTKQ code generation tool and
will replace the existing definitions.
2023-07-28 15:05:08 +02:00
mgold1234
7cb3f2d0b6 Wizard: add description field to Details steps 2023-07-28 12:24:25 +02:00
mgold1234
082dbf5de1 imageTable: Update links on empty state
This commit add specific link when open Immutable tab without any images at image builder table

Fixes # related to https://issues.redhat.com/browse/THEEDGE-3478
2023-07-28 12:13:53 +02:00
mgold1234
5c1952d8c9 Wizard: change the name of wizard details
This commit change the name of wizard-details to details, to prevent misconfusion with the image-name component
2023-07-26 17:13:42 +02:00
regexowl
b8d56fff15 ImagesTable: Fix bug where failed AWS images showed sharing error
Failed AWS images showed a `Failed to share image to one or more regions.` error even though they weren't shared to other regions.

This was caused by checking for a 'failure' status in an array of `imageStatuses` that included the parent status.
2023-07-21 21:05:57 +02:00
regexowl
c0cc236c5a ImagesTable: Update wording and links on empty state
This updates text and links on empty state according to recent mocks.
2023-07-20 13:20:24 +02:00
regexowl
03d2899843 LandingPage: Update the "About" popover
This updates the text on the "About" popover and adds links according to recent mocks.
2023-07-20 13:13:11 +02:00
acosferreia
164b065fd3 rename ib tab from traditional to conventional 2023-07-18 22:45:38 +02:00
mgold1234
ca2f2f7ba3 Wizard: change the image name
fixes #1196
this commit update the wording on image name step
when user create new image.
2023-07-17 17:05:03 +02:00
Djebran Lezzoum
e726ddc2a1 LandingPage: Fixes tabs selection on browser back/forward.
In the context of HMS-parity with edge management, fixes the current behavior when using browser history back and forward.
- When selecting a tab and then push the browser history back/forward, the tab of the current url is selected.

FIXES: https://issues.redhat.com/browse/THEEDGE-3460
2023-07-13 13:12:44 +02:00
regexowl
ea89a92bf1 LandingPage: Add "New" label to Immutable tab
This adds "New" label to the Immutable (OSTree) tab as per recent mocks.
2023-07-13 12:12:39 +02:00
regexowl
d03b17de13 Wizard: Remove ModalProps from schema
These changes were introduced in #1079 to ensure that quickstarts stay visible even after opening a Wizard modal as they are both top-most components.

`ModalProps` which were used for this purpose were introduced in version 3.20.6 of `@data-driven-forms/pf4-component-mapper`. Since then we had to regress the version to 3.20.5 as it was crashing the application on closing of a modal. The issue linked to this can be found here: https://github.com/data-driven-forms/react-forms/issues/1389

As we are now using mapper version that does not allow to use `ModalProps` the functionality of the workaround was lost and it was causing following console.error: `Warning: React does not recognize the `ModalProps` prop on a DOM element.`
2023-07-11 17:49:18 +02:00
regexowl
c4f616763d Wizard: Image name validation
This adds validation of an image name based on a pattern, which was chosen as an intersection of the naming constrains of hyperscalers.

The pattern is based on the one for naming GCP images as those naming guidelines are the most restrictive. With added minimal length restriction of AWS.
2023-07-11 10:39:32 +02:00
Sanne Raymaekers
f20686df4d CreateImageWizard: Add support for vsphere-ova imagetype
The OVA type is also the default when checking VMWare now.
2023-07-05 13:02:39 +02:00
Sanne Raymaekers
a5edf0bb75 src: Update doc links
The access.redhat.com documentation moved from
`https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/creating_customized_rhel_images_using_the_image_builder_service/index`
to
`https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/creating_customized_images_by_using_insights_image_builder/index`.
2023-06-30 15:33:50 +02:00
Thomas Lavocat
9136378935 Components/ReviewStepTextLists: remove useEffect
According to the documentation (https://react.dev/learn/you-might-not-need-an-effect)
useEffect should only be used to synchronize with external systems.

In the FSC component showing the partition table useEffect was used to
compute a value based on the form state.

The documentation present two relatable usecases to what we were doing
in the component:
- https://react.dev/learn/you-might-not-need-an-effect#resetting-all-state-when-a-prop-changes
- https://react.dev/learn/you-might-not-need-an-effect#updating-state-based-on-props-or-state

This commit uses the presented strategies to externalise in a new
component the computation of the MinSize. Because it has for dependency
the list of partitions and the manual setting, it will get redrwan every
time these values are changed in the form state.
2023-06-30 09:05:23 +02:00
regexowl
021f6019ba ImagesTable: Fix the GCP launch link
This fixes the bug when Launch button got replaced with Image command button even in the Preview.
2023-06-29 18:31:27 +02:00
regexowl
57be1e4a9d ImagesTable: Update Image commands popover for GCP images
This adds "Launch an instance" and "Save a copy" commands to the Image commands popover for GCP images.
2023-06-29 11:12:51 +02:00
mgold1234
8dbca83c14 googleCloud: Format the text on GCP target
This commit fix the format text when create image
with Google Cloud Platform target
related to issue: https://github.com/RedHatInsights/image-builder-frontend/issues/1195
2023-06-27 14:48:37 +02:00
Djebran Lezzoum
971d651cfd LandingPage: Integrate selected tab with url.
In the context of HMS-parity with edge management, fixes the current behavior when selecting tabs and navigating in edge image details view:
- when selecting a tabs the corresponding url is shown (the url can be copied , and when pasted we return the selected tab)
- when returning back from edge management details view, the user  return back to the last tab (e.g ostree tab)
FIXES: THEEDGE-3445
2023-06-27 12:24:13 +02:00
Lukas Zapletal
9ba6498037 GCP: rename Email label to Principal 2023-06-26 14:25:00 +02:00
mgold1234
795aa99fc3 imagesTable: capitalize all release values
This commit change the value of release column to be consistently,
and always show with Capital letter
related to issue - https://github.com/RedHatInsights/image-builder-frontend/issues/946
2023-06-26 13:05:29 +02:00
mgold1234
27c620939a LandingPage: Add edge images table
This commit adds the edge images table as a federated module, gated behind a feature flag.
the configuration is for dev environment to work with federation modules locally
2023-06-26 12:54:10 +02:00
lucasgarfield
0fd07f1f74 RTKQ: Add typing to RTKQ hooks in apiSlice
This commit adds typing to the RTK Query hooks. The hooks have been
refactored to be simpler and all custom query functions have been
removed.
2023-06-20 16:36:39 +02:00
lucasgarfield
8f454e5a89 ESLint: Add eqeqeq rule
This rule forbids use of == or !=, and enforces use of === and !==.
2023-06-20 14:55:10 +02:00
regexowl
2e6ea2ccaa ImagesTable: Remove Image name Spinner for failed Azure images
This removes Spinner next to the Image name when a build of an Azure image fails.
2023-06-15 14:56:04 +02:00
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