Skip to content

Fixes #39231 - Update webhooks table to use TableIndexPage#99

Merged
Lukshio merged 6 commits intotheforeman:masterfrom
pondrejk:wh-table
Apr 29, 2026
Merged

Fixes #39231 - Update webhooks table to use TableIndexPage#99
Lukshio merged 6 commits intotheforeman:masterfrom
pondrejk:wh-table

Conversation

@pondrejk
Copy link
Copy Markdown
Contributor

SAT-44159
Removing pf3 table usage that will be deprecated in core in favor of TableIndexPage.

In fact TableIndexPage was already used in WebhooksIndexPage, but it wrapped WrappedWebhooksTable that wrapped WebhooksTable that wrapped WebhooksTableSchema. Here I'm flattening the structure with aim to rely mostly on what TableIndexPage provides.

I'm also moving some general table helpers to general components dir as they will be likely up for reuse when the webhook templates page gets converted from erb

Copy link
Copy Markdown
Contributor

@Lukshio Lukshio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First round of review. Overall it looks good, I would also delete all the foremanReact mocks and replace it with JSTestSetup import from foreman core.

I would also move the helper components directly to formatters, it does not make me much sense to have "Component" which just returns icon etc.

Tests looks good buy maybe the foreman test setup will break something, but it should be minor changes.

Comment thread webpack/__mocks__/foremanReact/components/PF4/TableIndexPage/TableIndexPage.js Outdated
Copy link
Copy Markdown
Contributor

@Lukshio Lukshio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes, I just found some new adjustments.

Comment thread webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/WebhooksIndexPage.js Outdated
@Lukshio
Copy link
Copy Markdown
Contributor

Lukshio commented Apr 24, 2026

@pondrejk Changes looks good, I just found one last thing, please also remove this index file and replace the import https://github.com/pondrejk/foreman_webhooks/blob/2019a1c3d11330fa8d79dd4d10ec82f839a02a00/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/index.js

@Lukshio
Copy link
Copy Markdown
Contributor

Lukshio commented Apr 29, 2026

Tested by packit + manually

@Lukshio Lukshio merged commit 78b5399 into theforeman:master Apr 29, 2026
12 checks passed
@Lukshio
Copy link
Copy Markdown
Contributor

Lukshio commented Apr 29, 2026

Thanks @pondrejk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants