Commit graph

238 commits

Author SHA1 Message Date
regexowl
e657b88bfc src: Fix status text color
The `className` for text color was changed in PF6, this updates it in relevant places.
2025-07-21 07:54:20 +00:00
Katarina Sieklova
d03f41f160 Wizard: Make the blueprint name unclickable after filtering
Fixes #3419
2025-07-17 14:06:48 +00:00
regexowl
25a5f140d8 ESLint: Add rule to sort imports alphabetically
The `import/order` rule isn't enough to sort import within a single import group alphabetically.

This adds `sort-imports` rule that handles the sorting within groups.
2025-07-15 16:52:45 +00:00
regexowl
91b2cc2d10 ESLint: Add rule for duplicate imports
We had decent amount of import groups split into several imports, this adds a rule to output error when there's a duplicate import.
2025-07-15 16:52:45 +00:00
regexowl
a0fe3644c3 src: Remove more data-testids
As using `data-testid`s in tests is an anti-pattern, this removes more of them and replaces them with appropriate locators in the tests.
2025-07-15 16:51:29 +00:00
regexowl
b6e9fef70b Wizard: Change WSL file extension
This updates WSL file extension from `.tar.gz` to `.wsl`
2025-07-14 14:02:03 +00:00
regexowl
855f1430ad api: Update pull.sh, regenerate schemas and fix errors
This adds missing schema links to the `pull.sh` script, pulls new schema definitions, re-generates schemas and updates the code where needed.
2025-07-03 10:01:15 +00:00
regexowl
6521a46bb1 Wizard: Replace deprecated Modals with non-deprecated ones
The schema for `Modal` component changed between PF5 and PF6, this updates the modals to their non-deprecated version.
2025-07-03 09:19:22 +00:00
Gianluca Zuccarelli
e8d46dd716 deps: migrate fec/notifications
The frontend component library decoupled notifications from redux.
Dispatching notifications via the notifications middleware was replaced
by a new `useAddNotifications` hook.

We mostly used the notifications middleware outside of React Components
in our `enhancedImageBuilderApi` store for mutation events. I created a
wrapper around the RTK hooks that uses the `useAddNotification` hook
and created a directory for the new hooks.

In other places, where we were using the notification dispatcher inside
React components, I replaced the call with the new hook.

[1] b1d4973144/packages/notifications/doc/migration.md

bump @redhat-cloud-services/frontend-components-notifications

---
updated-dependencies:
- dependency-name: "@redhat-cloud-services/frontend-components-notifications"
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Co-authored-by: dependabot[bot] <support@github.com>
Assisted-by: cursor ide for generalizing the `useMutationWithNotification`
hook.
2025-07-01 09:17:38 +00:00
regexowl
0597541af2 Manually revert "Fedora-services: add support for fedora env"
This reverts #2984 as Fedora service frontend is not being currently actively maintained.
2025-06-27 14:15:05 +02:00
Gianluca Zuccarelli
c59cde1ab9 ImagesTable: fix main section alignment
With the change to PF6 the list of items in the table section was not
padded properly, we can fix this by wrapping the code in a `PageSection`
component.
2025-06-16 11:40:36 +00:00
Gianluca Zuccarelli
3dd67c8f39 CloudStatus: disable analytics for on-prem
Analytics was enabled for on-prem which broke the images table. This
commit disables the analytics for the on-prem frontend.
2025-06-12 13:29:58 +00:00
regexowl
3ac980e321 Wizard: Update <EmptyState> to match PF6 2025-05-28 09:08:52 -05:00
regexowl
91577343df src: Update <Content> tag components 2025-05-28 09:08:52 -05:00
regexowl
2080425753 src: Update remaining v5 version slugs 2025-05-28 09:08:52 -05:00
regexowl
4312cca4dd src: Run class-name-updater
This runs `npx @patternfly/class-name-updater src --v6 --fix`.
2025-05-28 09:08:52 -05:00
regexowl
1fc1f0cb8d src: Run codemods and lint
Run `npx @patternfly/pf-codemods@latest src --v6 --fix` and lint autofix to get the bulk of the changes in.
2025-05-28 09:08:52 -05:00
Sanne Raymaekers
23473fd1cd ImagesTable: add missing releases 2025-05-14 12:36:43 -05:00
Sanne Raymaekers
ef2050a705 src/constants: add rhel 10 to releases 2025-05-14 12:36:43 -05:00
regexowl
aedbbdc53a src: Remove unused data-testids
This removes unused `data-testid`s from the code base.
2025-05-09 10:14:54 +02:00
regexowl
5f9601586e ImagesTable: Add tracking to image downloads
This adds `imageBuilder - Image Downloaded` tracking event to track target, blueprint id and blueprint version for downloaded images.
2025-05-07 09:31:51 -05:00
Anna Vítová
5e4f94ccbe ImagesTable: remove else after return 2025-05-06 11:10:19 +02:00
regexowl
050a0d5458 analytics: Update name of a tracking event
This updates the name of `- Button Clicked` tracking event to more descriptive `- Copy UUID`.
2025-05-02 13:19:41 -05:00
regexowl
e6b030ea4c src: Remove ouia-ids
Since we're moving away from IQE the `ouia-id` atributes should be no longer needed. This removes them from the entire code base.
2025-04-25 11:32:43 +02:00
Sanne Raymaekers
ba2346aacf ImagesTable/Toolbar: add alert with blueprint linter errors
Includes a fix button which should resolve the errors automatically.
2025-04-17 13:40:10 +02:00
Sanne Raymaekers
2dde0f2177 api: support linting and fixing of blueprints 2025-04-17 13:40:10 +02:00
Lucas Garfield
e222b13476 ImagesTable/BlueprintsSideBar: Add Segment tracking (HMS-5989)
Needed so the Intercom team can decide whether or not to display an
onboarding video (first time user with no images or blueprints).
2025-04-17 08:58:40 +02:00
Katarina Sieklova
d18f25e331 Wizard: add segment tracking 2025-04-16 12:56:03 +02:00
Simon Steinbeiss
463bfddae5 ImagesTable: Fix AWS regions indicator (off by one)
The AWS regions indicator that is currently baked into each row
containing an AWS image is currently off by one due to incorrect
parentheses in the code.
This is now fixed, so it displays '(1)' when there is one region (which
is the default, us-east-1) instead of '(0)' which was both wrong and
confusing.
2025-04-10 12:04:56 +02:00
Sanne Raymaekers
90bf5cf91f src: Rely only osbuild-composer's cloudapi types
Use the predefined types in the status row and the onprem to hosted
mapper.
2025-02-05 15:54:57 +01:00
regexowl
7524bb1eef ImagesTable: Format status text
This adds formatting to the status text, ensuring it's the same as on Repositories step.
2025-02-04 13:55:30 +01:00
Sanne Raymaekers
6ec433f9d3 ImagesTable: fix local target status
The local target status in osbuild-composre ended up being called
`artifact_path`.
2025-02-04 10:22:19 +01:00
Sanne Raymaekers
1b4ecdb271 ImagesTable: ensure local target is copyable
To ensure the local file target is copyable and usable in
`cockpit-files`, the artefact directory needs to be readable.
2025-02-03 14:13:31 +01:00
Sanne Raymaekers
9b9de0bba5 ImagesTable/Instance: open cockpit's file browser for local imgs
Uses `cockpit.jump` to prevent the page actually loading, which makes it
very easy to navigate back to image builder.
2025-01-31 11:38:36 +01:00
Sanne Raymaekers
c8c62dda9d store/cockpitApi: compose status support
Finds the relevant compose, asks for its status and reads the original
compose request from disk.
2025-01-30 10:53:01 +01:00
Sanne Raymaekers
7bd5e2fa95 ImagesTable: switch to mixed api for getting composes 2025-01-30 10:53:01 +01:00
regexowl
607f2ee3c7 ImagesTable: Fix "no-unnecessary-condition" issues 2025-01-25 21:06:00 -06:00
Gianluca Zuccarelli
3e6985988a store/backendApi: export the relevant store api
Since the implementation of the cockpitApi and imageBuilderApi are different,
we should make sure to export the correct one depending on the environment
we are in.
2025-01-16 15:45:41 -06:00
regexowl
d3e76c6d49 ImagesTable: Fix version filter
This fixes the "All versions" / "Newest" filter in the blueprint images table.
2025-01-08 17:30:21 +01:00
regexowl
add30905ab ImagesTable: Fix images header
"All images" should change to "<blueprint_name> images" when a blueprint is selected.
2025-01-08 15:11:13 +01:00
regexowl
34b4f243ff ImagesTable: Fix compose filtering by selected blueprint
The filtering was defaulting to version '1', making images of other versions not appear when selecting a blueprint.

How to reproduce:
1. create a blueprint
2. build an image
3. edit the blueprint to get it to version 2
4. build another image

Current behaviour:
- only image with version 1 is visible

After fix:
- both image for version 1 and image for version 2 of the blueprint should be visible when the blueprint is selected
2025-01-08 13:11:38 +01:00
regexowl
5e4f20edf1 src: Make spinners spin
This replaces the `<InProgressIcon>` with animated spinners to indicate that something is happening.
2025-01-06 10:17:49 +01:00
Gianluca Zuccarelli
0d4bb26e0f multiple: check when var is possibly undefined
In cases where a field on an object might be undefined,
rather omit the value than set the field to undefined.
2024-12-06 12:02:34 -06:00
Gianluca Zuccarelli
d4436dc6a9 multiple: set sane defaults
Set sane defaults for some types rather than setting them to `undefined`.
This is so that we can set `exactOptionalPropertyTypes` to true in our
tsconfig.
2024-12-06 12:02:34 -06:00
Gianluca Zuccarelli
877497f81c pagination 2024-12-06 12:02:34 -06:00
Gianluca Zuccarelli
4125a9cd3b multiple: set pagination defaults
Set pagination defaults, otherwise these might be `undefined`.
2024-12-06 12:02:34 -06:00
Gianluca Zuccarelli
bad77421ae api: union undefined
Set the option to generate union undefined types for objects that have
optional items. This will allow us to enable `exactOptionalPropertyTypes`
in our tsconfig [1].

[1] This is a recommended setting, see:
https://www.typescriptlang.org/tsconfig/#exactOptionalPropertyTypes
2024-12-06 12:02:34 -06:00
Ondřej Ezr
f270139ec1 ImagesTable: add RHEL 9.5 display value 2024-11-28 09:01:08 +01:00
regexowl
f48e1bfcb5 ImagesTable: Unify pagination format with Repositories
This makes bottom pagination format on ImagesTable consistent with the format being used in Repositories service.
2024-11-25 19:04:54 +01:00
regexowl
d8bb3485d8 Wizard: Add v5 PF slug to classNames
This adds v5 PF slug to classNames throughout the code base, making the formatting work properly.
2024-11-25 16:54:59 +01:00