Spinner in puppet class parameters spinning indefinitely on hostgroup creation
When creating a new hostgroup, a spinner in puppet class table under 'Parameters' tab appears and spins indefinitely.
1) Configure > Hostgroups > New Hostgroup
2) select arbitrary Lifecycle Environment
3) select arbitrary Puppet Environment
4) go to 'Parameters' tab
5) spinner is spinning indefinitely as a result of failed call to the server
Root cause is that hostgroup id is expected in params (which naturally does not exists since hostgroup has not been created yet): https://github.com/theforeman/foreman/blob/develop/app/controllers/hostgroups_controller.rb#L93