Skip to content

Commit

Permalink
Merge pull request #2949 from martinpovolny/foreman_fixes
Browse files Browse the repository at this point in the history
Foreman fixes
(cherry picked from commit 0165bae)
  • Loading branch information
mzazrivec authored and simaishi committed Dec 11, 2017
1 parent 92d5ed7 commit c2a0e6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
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

0 comments on commit c2a0e6d

Please sign in to comment.