Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #30913 - drop environment field from Host(group) form #33

Merged
merged 1 commit into from Oct 30, 2020

Conversation

ezr-ondrej
Copy link
Owner

Drops the environment field and all js attached to it.

Extracted in theforeman/foreman_puppet#64.

@ezr-ondrej ezr-ondrej added the puppet Puppet extraction label Oct 26, 2020
@ezr-ondrej ezr-ondrej force-pushed the drop_host_environment_field branch 5 times, most recently from 9022167 to ba20fad Compare October 29, 2020 01:23
@ezr-ondrej ezr-ondrej force-pushed the drop_host_environment_field branch 2 times, most recently from 137e02a to 7fb939d Compare October 29, 2020 02:52
@@ -296,7 +255,6 @@ function handleHostgroupChangeEdit(element, host_id, host_changed) {
} else {
// edit host
set_inherited_value(element);
update_puppetclasses(element);

Choose a reason for hiding this comment

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

How do we handle this and other events that should reload/update one of the puppet tabs?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I've moved all these functions to the webpack file in plugin and added the events to the global js file:
https://github.com/theforeman/foreman_puppet_enc/pull/64/files#diff-c26a70779db93ece76946fdfe9f914a20986c4177863883f79a75dab2d7bd90eR14-R30

I've tried hard to decode when should the tabs/info get reloaded and do the same.
One difference that I didn't know how to avoid is reloading the puppet parameters on OS and domain change. Now we are changing it after the ajax (os_changed, domain_change) success, but in the plugin I'm running them right away after the selection. Hopefully it should not be an issue and I've tested it's ok, but I'm not sure if I've missed something that could get affected by that 🤔

Drops the environment field and all js attached to it.

Extracted in theforeman/foreman_puppet#64.
@ezr-ondrej
Copy link
Owner Author

Lets get this over with.

@ezr-ondrej ezr-ondrej merged commit 10c1222 into puppet_extraction Oct 30, 2020
@ezr-ondrej ezr-ondrej deleted the drop_host_environment_field branch October 30, 2020 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
puppet Puppet extraction
Projects
None yet
2 participants