Skip to content

webpack5 - #10735

Merged
jeremylenz merged 1 commit into
Katello:masterfrom
MariaAga:webpack5-katello
Jan 26, 2024
Merged

webpack5#10735
jeremylenz merged 1 commit into
Katello:masterfrom
MariaAga:webpack5-katello

Conversation

@MariaAga

Copy link
Copy Markdown
Contributor

Comment thread engines/bastion_katello/lib/bastion_katello/engine.rb Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What defines this type? Is it webpack itself or something else?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it looked more correct to use module than text/javascript https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

@ianballou

Copy link
Copy Markdown
Member

Foreman PR: theforeman/foreman#9834

@MariaAga
MariaAga marked this pull request as ready for review November 29, 2023 11:41
Comment thread app/views/overrides/activation_keys/_host_synced_content_select.html.erb Outdated
Comment thread engines/bastion/app/views/bastion/layouts/assets.html.erb Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks very similar to what js_tags_for(requested_plugins) already does for katello, except that this calls it for common_index and the other does it for index.

I'm trying to understand what common_index.js even does. I don't see anything that includes it and it only requires ngreact. If you don't have this, what happens? If it's needed, can it just be moved into katello's index.js?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It loads angular, and since angular is not needed in all of Katello I think we shouldn't move it to index.
Without angular pages are just empty.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That makes sense. Thanks for explaining.

@jeremylenz

Copy link
Copy Markdown
Member

See theforeman/foreman#9834 (comment)

If this is ready to go, please create a Redmine. thanks!

@jeremylenz

Copy link
Copy Markdown
Member

looks like angular is failing on eslint

@ekohl

ekohl commented Jan 26, 2024

Copy link
Copy Markdown
Member

Core PR was merged, so this should be merged.

@jeremylenz
jeremylenz merged commit 7091b11 into Katello:master Jan 26, 2024
:name => 'bastion_katello',
:javascript => proc do
[
javascript_include_tag(*webpack_asset_paths('katello:common', :extension => 'js'), "data-turbolinks-track" => true),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This broke the "Sync Status" (/katello/sync_management) page, as the console now contains the following error:

63:2 Uncaught ReferenceError: localize is not defined

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looking into that

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's an ERB page, I wonder why we're even loading Katello JS here 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

created #10873

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants