Commit graph

158 commits

Author SHA1 Message Date
regexowl
305d4d9768 ImagesTable: Update column headers
This updates the name of column headers as per recent mocks.
2024-04-18 17:54:37 +02:00
Ondrej Ezr
04131c4823 Blueprints: selected Blueprint Empty state action
Add action in the Images Table empty state when Blueprint is selected.
Change the icon to plus as it better underlines the action needed to remedy.
2024-04-17 16:03:05 +02:00
regexowl
7115b43c3d Blueprints: Surface "Edit blueprint" button
This surfaces "Edit blueprint" button to the ImageTableToolbar and removes it from the blueprints actions menu as per recent mocks.
2024-04-16 18:31:05 +03:00
regexowl
1a784f4ded Blueprints: No Build Image button without a blueprint
This hides the Build Image button and blueprint actions kabob when no blueprint is selected as per recent mocks.
2024-04-04 15:52:17 +02:00
Amir
e1a7725af4 fix(HMS-3851): remove 'recreate image' from kebab dropdown 2024-04-04 12:13:13 +02:00
Anna Vítová
e886da4a66 fixes(#1773): Empty state columns 2024-04-02 10:17:55 +02:00
Ondrej Ezr
aa0a3f107c Images: add popover when the image is outdated
Add Popover to inform user the image is build for an older then current Blueprint version.

Fixes HMS-3763
2024-03-21 12:14:37 +01:00
Anna Vítová
2d8b2b2796 fixes(HMS-3778): Show image name only after it is loaded 2024-03-19 14:59:44 +01:00
Anna Vítová
a3a7ea88c5 feat(HMS-3401): Add blueprints sidebar pagination 2024-03-18 10:06:05 +01:00
Ondrej Ezr
9b5f3631d1 Blueprints: filter composes by blueprint version
Refs: HMS-3412
2024-03-07 17:19:32 +01:00
Ondrej Ezr
947c20875c ImagesTable: extract toolbar to separate component
This extracts the toolbar, that was getting bit too big to a separate component.
It also adjusts the title to correspond to the filter of the images.
If there is a Blueprint selected, it changes the title to '<BlueprintName> images'
2024-03-07 16:48:08 +01:00
regexowl
8fac905482 V2Wizard: Gate table title behind experimental
This adds gating the ImagesTable title behind experimental so it doesn't render in the "classic" table.
2024-03-07 09:21:27 +01:00
Amir
61b86da98a Blueprints: add blueprints slice for client global state 2024-03-06 12:52:03 +01:00
lucasgarfield
358dd70889 Blueprints table: Add title
Adds title to blueprints table. Later we will need to extract this into
a new component that changes the value depending on whether a blueprint
is selected or not (if blueprint is selected, it will need to show
blueprint name).
2024-03-06 12:32:27 +01:00
lucasgarfield
68e4cba9a3 Blueprints Table: Hide Create image button
This button is used to launch the wizard in the old images table, it
should not be used in the blueprints table (as the Create blueprint
button has been moved to the header).
2024-03-06 10:34:22 +01:00
lucasgarfield
c73482dd7f Utilities: Add useExperimentalFlag hook
This commit DRYs out the code, extracting the logic for setting the
value of the experimentalFlag into a new hook found in the utilities.

It also makes the typing stricter - the hook returns a boolean. The
pattern we were using previously to set the value of experimentalFlag
variables could be boolean, string, or undefined.
2024-03-05 19:27:46 +01:00
lucasgarfield
baddf66273 Test: rename create-image-action data-testid
The data-testid for the Create image button in the empty state has been
renamed from create-image-action has been renamed to create-image-action-empty-state.

The test `renders EmptyState child component` started failing after changing
isBeta() from false to true in the useChrome() mocking function.

It was failing because the findBy query selector was able to find two
components with this data-testid, which was truly the case - the Create
Image button in the table header, and the Create Image button in the
empty state.

I have no explanation for why this test wasn't failing before.
2024-03-05 19:27:46 +01:00
Thomas Lavocat
c81ac76ea8 App: experimental features in beta only
When the unleash switch `image-builder.new-wizard.enabled` will get
activated on stage the blueprint and new wizard will be visible on the
platform.
To make them only visible in preview we need to change the condition to
check if Beta is selected by the user.
2024-03-05 19:27:46 +01:00
Anna Vítová
5813fdaf10 feat(HMS-3686): Update position of blueprint buttons 2024-03-05 13:49:31 +01:00
Amir
97b7aa6bfd fix(HMS-3704): hiding blueprint out of sync alert 2024-03-04 18:11:10 +01:00
Amir
a911c02780 Blueprints: add blueprint's images empty state 2024-03-04 15:36:06 +01:00
Amir
5b662a39ea Blueprints: add blueprint out-of-sync alert 2024-02-28 13:04:40 +01:00
regexowl
d834099a9b ImagesTable: Replace null with an empty string in ClipboardCopy
ClipboardCopy component doesn't like null anymore so this replaces it with an empty string.
2024-02-27 10:37:17 +01:00
Amir
97a75e0465 feat(HMS-3392): add blueprint's version in image table 2024-02-08 07:35:18 +01:00
Amir
13ca8e868d feat(HMS-3431): add a blueprint build images 2024-02-07 17:58:13 +01:00
Amir
017f5bfb51 feat(HMS-3391): add blueprint onclick handler 2024-01-25 09:28:34 +01:00
lucasgarfield
531369276c ImagesTable: Add error state
It is important we have an error state for times that we may need to
bring the image builder service down for whatever reason.
2024-01-24 20:09:42 +01:00
regexowl
3ac435db85 ImagesTable: Remove unused Skeleton
This removes an unused compoment from the imports.
2024-01-05 12:25:10 +01:00
mgold1234
262ac6d3be ImagesTable: fix grey box under AMI when image build is in progress
Previously a Skeleton component was used as a placeholder for an AMI when the build was still pending.
This removes the Skeleton and returns undefined rendering the AMI as empty.
2024-01-03 08:51:14 +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
Sanne Raymaekers
b60c37f1f8 ImagesTable: show architecture of composes 2023-11-23 17:55:43 +01:00
mgold1234
b8c634eac0 fix some lint warning message 2023-11-20 09:37:12 +01:00
Sanne Raymaekers
f1141ec698 src: add RHEL 8.9 2023-11-16 14:44:21 +01:00
Sanne Raymaekers
6e737c59a9 src: add rhel-93 2023-11-13 17:32:32 +01:00
regexowl
1fd8deec1a ImagesTable: Add expiring/expired status to OCI images
Pre-authenticated requests for the OCI images expire 7 days after creation. This adds "Expires in <x> days" and "Expired" as possible statuses for the OCI images.
2023-11-07 11:13:28 +01:00
regexowl
7ec87dfa58 fixtures: Add OCI images to the mock fixtures
This adds an expired mock OCI image with an ID "0c1ec8d8-be39-47f2-9bd4-a3fff8244fce" and an expiring mock OCI image with an ID "ea23cfd6-fd8b-43ed-adfc-9f76bb8487ef".
2023-11-07 11:13:28 +01:00
regexowl
b8372eeaf5 ImagesTable: Add OCI images
This adds a row for OCI images in the ImagesTable. Details about the images show UUID of the image and the Object Storage URL which is needed to deploy the image.

"Image link" button in the Instance column contains instrucion on how to run an OCI image built by Image Builder in Oracle Cloud. The documentation link in the popover is just a placeholder for now as the documentation is being prepared.

Until the build is finished the "Image link" button is disabled as it would be missing the Object Storage URL which is creating on upload.
2023-11-07 11:13:28 +01:00
regexowl
6a19aae96c ImagesTable: Fix padding of disabled download links
This fixes an uneven padding for disabled "Download (....)" links.
2023-11-02 12:33:42 +01:00
mgold1234
d91727bf38 ImageTable: THEEDGE-3450 - add ignoreImageType to getComposes endpoint
this commit adds filter for image_type to the getComposes endpoint,
enhancing the functionality of the Image Builder frontend table, which comprises two tabs: RPM and OSTree.
With this enhancement, users can now filter OSTree images from the RPM tab, preventing duplication.
2023-10-26 15:53:31 +02:00
jkozol
a5b1b1f775 package.json: upgrade patternfly to version 5
This upgrade requires multiple package updates. There are many style
updates to reflect pf5's syntax and structure changes
2023-10-25 09:02:47 +02:00
Sanne Raymaekers
d706a7e5e2 ImagesTable: show error popover on s3 images
The error popover should be shown in case there's a reason for the
error. This is already the case for the other image types.
2023-10-12 15:24:55 +02:00
Thomas Lavocat
273aa52711 api: update to latest image builder
This will let the code access the new endpoints to get the OSCAP
profiles and OSCAP customizations for the images.

HMS-2077
2023-10-06 16:26:09 +02:00
lucasgarfield
99ae627007 LaunchWizard: Correct architecture prop
The `<LaunchWizard>` architecture prop was specified incorrectly,
which caused the Instance dropdown in the Launch wizard to fail to load
instance types.
2023-09-18 16:08:57 +02:00
lucasgarfield
adaec7e34d LaunchWizard: Restore Launch wizard functionality
This commit is a hotfix that restores functionality to the Launch
wizard.

The `appendTo` variable can't be recomputed on every render. Wrap it in
a useState() hook to work properly.

Additionally, the `hasAccess`  property was missing from the
<ProvisioningWizard> component.

To ensure full backwards compatibility, the component has also been
wrapped in a <Suspense> as it was previously.
2023-09-18 15:38:47 +02:00
lucasgarfield
7b9e726151 ImagesTable: Convert ImagesTable to Typescript & RTK Query
This commit converts the Images Table to Typescript and converts all API
calls to image-builder to use RTK Query hooks.

This should increase the performance of the app significantly.
Previously our calls to the image-builder API were made in series. They
are now made in parallel. We may want to investigate the possibility of
hitting rate limiting now that we will be issuing requests in much more
rapid succession.

In the tests, moving to RTK Query hooks has allowed us to remove
virtually all Jest mocking. However, this means that some of our
previous tests which tested against implementation details were broken.
Most notably, we no longer check the Redux store to verify that clones
have been added correctly and we no longer check that compose requests
were issued successfully. Test coverage will be restored in a follow-up
PR where the dev-dependency @msw/data is added. Adding a persistent data
layer to the tests using @msw/data will allow us to verify that our POST
requests (creating composes and cloning them) are working by testing
that the Images Table has been updated.
2023-09-18 10:35:04 +02:00
Amir Fefer
0822a69619 feat(HMS-1454): add RBAC permissions to launch wizard 2023-09-07 14:18:44 +02:00
Sanne Raymaekers
93c1f43544 CreateImageWizard: add WSL image type in preview 2023-08-29 13:37:56 +02:00
lucasgarfield
a5aad6935f ImagesTable: Update RegionsPopover to prepare for Launch/Provisioning GA
Previously, the Launch/Provisioning wizard was only available in
preview. If an AWS or Azure image was created in preview and shared with
a source, and then viewed in the images table in stable, a popover over
the stable launch link would inform the user that the image had been
created in preview and provide a link to go to preview.

Now that launch/provisioning is going GA and the launch wizard is
available in stable, this feature is no longer necessary.
2023-08-23 15:59:32 +02:00
Ondrej Ezr
2a8e5a10df Launch button in stable environments
This moves Beta only features to stable environment:
- Sharing Images through Sources
- Launch button

This tries to avoid any refactoring, just moving components from Beta to stable with minimal changes.
2023-08-23 09:27:25 +02:00
lucasgarfield
29704a0725 eslint/hooks: obey rules of hooks
See https://legacy.reactjs.org/docs/hooks-rules.html.
2023-08-17 17:18:55 +02:00