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

Foreman fixes #2949

Merged
merged 4 commits into from Dec 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/controllers/provider_foreman_controller.rb
Expand Up @@ -372,6 +372,7 @@ def update_partials(record_showing, presenter)
if record_showing && valid_configured_system_record?(@configured_system_record)
get_tagdata(@record)
presenter.hide(:form_buttons_div)
presenter.remove_sand
presenter.update(:main_div, r[:partial => "layouts/textual_groups_generic"])
elsif @in_a_form
partial_locals = {:controller => controller_name}
Expand All @@ -385,6 +386,7 @@ def update_partials(record_showing, presenter)
presenter.update(:main_div, r[:partial => partial, :locals => partial_locals])
elsif valid_configuration_profile_record?(@configuration_profile_record)
presenter.hide(:form_buttons_div)
presenter.remove_sand
presenter.update(:main_div, r[:partial => "configuration_profile",
:locals => {:controller => controller_name}])
else
Expand Down Expand Up @@ -480,6 +482,7 @@ def update_options
when :configuration_manager_cs_filter
:cm_configured_systems
end
options[:gtl_dbname] = options[:dbname]
options
end
private :update_options
Expand Down
6 changes: 4 additions & 2 deletions spec/controllers/provider_foreman_controller_spec.rb
Expand Up @@ -429,7 +429,8 @@
allow(controller).to receive(:x_active_accord).and_return(:configuration_manager_providers)
allow(controller).to receive(:build_listnav_search_list)
controller.instance_variable_set(:@_params, :id => "configuration_manager_providers_accord")
expect(controller).to receive(:get_view).with("ManageIQ::Providers::ConfigurationManager", :dbname => :cm_providers).and_call_original
expect(controller).to receive(:get_view).with("ManageIQ::Providers::ConfigurationManager",
:gtl_dbname => :cm_providers, :dbname => :cm_providers).and_call_original
controller.send(:accordion_select)
end

Expand All @@ -439,7 +440,8 @@
allow(controller).to receive(:x_active_accord).and_return(:configuration_manager_cs_filter)
allow(controller).to receive(:build_listnav_search_list)
controller.instance_variable_set(:@_params, :id => "configuration_manager_cs_filter_accord")
expect(controller).to receive(:get_view).with("ManageIQ::Providers::Foreman::ConfigurationManager::ConfiguredSystem", :dbname => :cm_configured_systems).and_call_original
expect(controller).to receive(:get_view).with("ManageIQ::Providers::Foreman::ConfigurationManager::ConfiguredSystem",
:gtl_dbname => :cm_configured_systems, :dbname => :cm_configured_systems).and_call_original
allow(controller).to receive(:build_listnav_search_list)
controller.send(:accordion_select)
end
Expand Down