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 #36278 - Use hostgroup os refresh path in hostgroup edit #10505

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

adamruzicka
Copy link
Member

What are the changes introduced in this pull request?

Previously the code path taken to update OS when one of the katello fields was changed was determined based on presence of dom element matching #hostgroup_parent_id. However, this element was only present if the user was editing a hostgroup and had more than one hostgroup visible in the current context.

The refresh should now get triggered if data-type of element matching #hostgroup_operatingsystem_id is hostgroup which should be a more reliable indicator.

What are the testing steps for this pull request?

  1. Have two LFEs
  2. Have a content view
  3. Have an OS with available
  4. Promote the content view to both LFEs
  5. Create a hostgroup, assign one of the LFEs, the CV, architecture and OS to it
  6. Edit the hostgroup, change its LFE

You should see a request being done to /hostgroups/os_selected.

Without this patch, this should only happen if you have multiple hostgroups.

Previously the code path taken to update OS when one of the katello
fields was changed was determined based on presence of dom element
matching #hostgroup_parent_id. However, this element was only present if
the user was editing a hostgroup and had more than one hostgroup visible
in the current context.

The refresh should now get triggered if data-type of element
matching #hostgroup_operatingsystem_id is hostgroup which should
be a more reliable indicator.
@theforeman-bot
Copy link

Issues: #36278

Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

ACK, works great. I am able to see the connection being made with just one hostgroup.

@chris1984 chris1984 merged commit d1b0d46 into Katello:master Apr 13, 2023
@adamruzicka adamruzicka deleted the hostgroup-js branch April 17, 2023 08:03
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.

3 participants