Skip to content

Commit

Permalink
Merge pull request ManageIQ#7078 from himdel/settings_loader
Browse files Browse the repository at this point in the history
Menu - drop SettingsLoader
  • Loading branch information
h-kataria authored May 29, 2020
2 parents 62f4ef8 + 5fad0b9 commit 4211196
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 83 deletions.
1 change: 0 additions & 1 deletion app/presenters/menu/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def initialize
load_default_items
load_custom_items(Menu::YamlLoader)
load_custom_items(Menu::CustomLoader)
load_custom_items(Menu::SettingsLoader)
end

def merge_sections(sections)
Expand Down
39 changes: 0 additions & 39 deletions app/presenters/menu/settings_loader.rb

This file was deleted.

1 change: 0 additions & 1 deletion config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
:physical_infra_provider: https://manageiq.org/docs/reference/latest/doc-Managing_Providers/miq/#infrastructure_providers
:ui:
:custom_button_count: 3
:custom_menu:
11 changes: 0 additions & 11 deletions spec/presenters/menu/menu_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,4 @@
end
end
end

context "menu" do
it "knows about custom items from settings" do
::Settings.ui.custom_menu = settings_custom_items
count = 0
Menu::Manager.menu.each do |item|
count += 1 if item.kind_of?(Menu::Item) && item.name =~ /^Custom Item/
end
expect(count).to eq(2)
end
end
end
10 changes: 0 additions & 10 deletions spec/presenters/menu/settings_loader_spec.rb

This file was deleted.

21 changes: 0 additions & 21 deletions spec/support/menu_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,6 @@ def section_file
def item_file
create_temp_file(ITEM_DEF)
end

def settings_custom_items
[
{
:type => 'item',
:icon => 'fa fa-bug',
:id => 'custom_i1',
:name => 'Custom Item 1',
:href => 'https://www.redhat.com',
:rbac => 'vm_explorer'
},
{
:type => 'item',
:icon => 'pficon pficon-help',
:id => 'custom_i2',
:name => 'Custom Item 2',
:href => 'https://www.hmpf.cz',
:rbac => 'vm_explorer'
}
]
end
end
end
end

0 comments on commit 4211196

Please # to comment.