theforeman/foreman — pull request #1538 by eLobato (2014-06-25 00:15:10+00:00)
Title: Fixes #6337 - VM tab is hidden when we deselect profile

The event computeResourceSelected is called ```onChange``` for both the Compute Resource selector and the Compute Profile selector in the Host#edit form. Before this patch, choosing a Compute Profile, then no Compute Profile (empty entry in the dropdown) would close the Virtual Machine tab, even though a Compute Resource was still selected.

It required a minor tweak to make the function only close the Virtual Machine tab only when the Compute Resource selector goes to Bare Metal. When Compute Profile "None" is selected, it should just remove all settings set by any other Compute Profile previously.