Skip to content

Commit

Permalink
Merge pull request #2694 from martinpovolny/foreman_fixes
Browse files Browse the repository at this point in the history
Fix various issues in Foreman UI causes by GTL.
  • Loading branch information
h-kataria authored Nov 10, 2017
2 parents 288ae48 + 1c1ac97 commit 4a76f01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/controllers/provider_foreman_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def configuration_profile_node(id, model)
else
options = {:model => "ConfiguredSystem", :match_via_descendants => 'ConfiguredSystem'}
if empty_configuration_profile_record?(@configuration_profile_record)
options[:named_scope] = [[:with_manager, id], [:with_configuration_profile_id, nil]]
options[:named_scope] = [[:with_manager, id], [:without_configuration_profile_id]]
else
options[:named_scope] = [[:with_configuration_profile_id, @configuration_profile_record.id]]
end
Expand Down Expand Up @@ -451,7 +451,7 @@ def add_unassigned_configuration_profile_record(provider_id)
'manager_id' => provider_id
}

if @view
unless @view.table.kind_of?(Hash)
add_unassigned_configuration_profile_record_to_view(unassigned_profile_row, unassigned_configuration_profile)
end
{
Expand Down
3 changes: 2 additions & 1 deletion spec/controllers/provider_foreman_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,15 @@
allow(controller).to receive(:current_page).and_return(1)
controller.send(:build_accordions_and_trees)
end

it "renders right cell text for root node" do
key = ems_key_for_provider(@provider)
controller.send(:get_node_info, "root")
right_cell_text = controller.instance_variable_get(:@right_cell_text)
expect(right_cell_text).to eq("All Configuration Management Providers")
end

pending "renders right cell text for ConfigurationManagerForeman node" do
it "renders right cell text for ConfigurationManagerForeman node" do
controller.instance_variable_set(:@in_report_data, true)
ems_id = ems_key_for_provider(@provider)
controller.instance_variable_set(:@_params, :id => ems_id)
Expand Down

0 comments on commit 4a76f01

Please sign in to comment.