From ec48d18f0b10977810c9c3d7c9e3b5c777b8606b Mon Sep 17 00:00:00 2001 From: Sandeep Reddy Date: Thu, 4 Jan 2024 19:25:00 +0530 Subject: [PATCH] Fix Navigation issue --- .../resource_pool_cloud_controller.rb | 2 +- .../resource_pool_infra_controller.rb | 2 +- app/presenters/menu/default_menu.rb | 4 +- .../resource_pool_cloud/_config.html.haml | 4 +- app/views/resource_pool_cloud/show.html.haml | 2 +- .../resource_pool_infra/_config.html.haml | 4 +- app/views/resource_pool_infra/show.html.haml | 2 +- spec/config/routes.pending.yml | 83 +++++++++++++++++++ 8 files changed, 93 insertions(+), 10 deletions(-) diff --git a/app/controllers/resource_pool_cloud_controller.rb b/app/controllers/resource_pool_cloud_controller.rb index 1341b9c26768..45dbd8078509 100644 --- a/app/controllers/resource_pool_cloud_controller.rb +++ b/app/controllers/resource_pool_cloud_controller.rb @@ -23,6 +23,6 @@ def breadcrumbs_options } end - menu_section :clo + menu_section :resource_pool_cloud feature_for_actions "#{controller_name}_show_list", *ADV_SEARCH_ACTIONS end diff --git a/app/controllers/resource_pool_infra_controller.rb b/app/controllers/resource_pool_infra_controller.rb index c9227a74c735..49365c137df5 100644 --- a/app/controllers/resource_pool_infra_controller.rb +++ b/app/controllers/resource_pool_infra_controller.rb @@ -23,6 +23,6 @@ def breadcrumbs_options } end - menu_section :inf + menu_section :resource_pool_infra feature_for_actions "#{controller_name}_show_list", *ADV_SEARCH_ACTIONS end diff --git a/app/presenters/menu/default_menu.rb b/app/presenters/menu/default_menu.rb index e7f1cad5c086..a94355891761 100644 --- a/app/presenters/menu/default_menu.rb +++ b/app/presenters/menu/default_menu.rb @@ -84,7 +84,7 @@ def clouds_menu_section Menu::Item.new('orchestration_stack', N_('Stacks'), 'orchestration_stack', {:feature => 'orchestration_stack_show_list'}, '/orchestration_stack/show_list'), Menu::Item.new('auth_key_pair_cloud', N_('Key Pairs'), 'auth_key_pair_cloud', {:feature => 'auth_key_pair_cloud_show_list'}, '/auth_key_pair_cloud/show_list'), Menu::Item.new('placement_group', N_('Placement Groups'), 'placement_group', {:feature => 'placement_group_show_list'}, '/placement_group/show_list'), - Menu::Item.new('resource_pool', N_('Resource Pools'), 'resource_pool', {:feature => 'resource_pool_show_list'}, '/resource_pool_cloud/show_list'), + Menu::Item.new('resource_pool_cloud', N_('Resource Pools'), 'resource_pool_cloud', {:feature => 'resource_pool_show_list'}, '/resource_pool_cloud/show_list'), Menu::Item.new('cloud_databases', N_('Databases'), 'cloud_database', {:feature => 'cloud_database'}, '/cloud_database/show_list'), ]) end @@ -95,7 +95,7 @@ def infrastructure_menu_section Menu::Item.new('ems_cluster', N_("Clusters"), 'ems_cluster', {:feature => 'ems_cluster_show_list'}, '/ems_cluster/show_list'), Menu::Item.new('host', N_("Hosts"), 'host', {:feature => 'host_show_list'}, '/host/show_list'), Menu::Item.new('vm_infra', N_('Virtual Machines'), 'vm_infra_explorer', {:feature => 'vm_infra_explorer', :any => true}, '/vm_infra/explorer'), - Menu::Item.new('resource_pool', N_('Resource Pools'), 'resource_pool', {:feature => 'resource_pool_show_list'}, '/resource_pool_infra/show_list'), + Menu::Item.new('resource_pool_infra', N_('Resource Pools'), 'resource_pool_infra', {:feature => 'resource_pool_show_list'}, '/resource_pool_infra/show_list'), Menu::Item.new('storage', N_('Datastores'), 'storage', {:feature => 'storage_show_list'}, '/storage/explorer'), Menu::Item.new('pxe', N_('PXE'), 'pxe', {:feature => 'pxe', :any => true}, '/pxe/explorer'), Menu::Item.new('switch', N_('Networking'), 'infra_networking', {:feature => 'infra_networking', :any => true}, '/infra_networking/explorer'), diff --git a/app/views/resource_pool_cloud/_config.html.haml b/app/views/resource_pool_cloud/_config.html.haml index b84440bb0069..e6d057b3a11c 100644 --- a/app/views/resource_pool_cloud/_config.html.haml +++ b/app/views/resource_pool_cloud/_config.html.haml @@ -8,13 +8,13 @@ %table.table.table-bordered.table-striped - if rp_config.blank? %tr - %td{:width => "495"} + %td{ :width => "495" } %strong= _('Not Available') - else - rp_config.each_slice(2) do |items| %tr - items.each do |item| - %td{:width => "495"} + %td{ :width => "495" } %strong = h(item[:field]) = h(item[:description]) diff --git a/app/views/resource_pool_cloud/show.html.haml b/app/views/resource_pool_cloud/show.html.haml index 60deaee2a60d..ad1cefa28ed1 100644 --- a/app/views/resource_pool_cloud/show.html.haml +++ b/app/views/resource_pool_cloud/show.html.haml @@ -1,5 +1,5 @@ #main_div - - if %w(vms all_vms hosts clusters resource_pools).include?(@display) && @showtype != "compare" + - if %w[vms all_vms hosts clusters resource_pools].include?(@display) && @showtype != "compare" = render :partial => "layouts/gtl", :locals => {:action_url => "show/#{@record.id}"} - else - case @showtype diff --git a/app/views/resource_pool_infra/_config.html.haml b/app/views/resource_pool_infra/_config.html.haml index b84440bb0069..e6d057b3a11c 100644 --- a/app/views/resource_pool_infra/_config.html.haml +++ b/app/views/resource_pool_infra/_config.html.haml @@ -8,13 +8,13 @@ %table.table.table-bordered.table-striped - if rp_config.blank? %tr - %td{:width => "495"} + %td{ :width => "495" } %strong= _('Not Available') - else - rp_config.each_slice(2) do |items| %tr - items.each do |item| - %td{:width => "495"} + %td{ :width => "495" } %strong = h(item[:field]) = h(item[:description]) diff --git a/app/views/resource_pool_infra/show.html.haml b/app/views/resource_pool_infra/show.html.haml index 60deaee2a60d..ad1cefa28ed1 100644 --- a/app/views/resource_pool_infra/show.html.haml +++ b/app/views/resource_pool_infra/show.html.haml @@ -1,5 +1,5 @@ #main_div - - if %w(vms all_vms hosts clusters resource_pools).include?(@display) && @showtype != "compare" + - if %w[vms all_vms hosts clusters resource_pools].include?(@display) && @showtype != "compare" = render :partial => "layouts/gtl", :locals => {:action_url => "show/#{@record.id}"} - else - case @showtype diff --git a/spec/config/routes.pending.yml b/spec/config/routes.pending.yml index 415225567957..5eeba7a01835 100644 --- a/spec/config/routes.pending.yml +++ b/spec/config/routes.pending.yml @@ -1054,6 +1054,77 @@ ReportController: - x_history - x_show ResourcePoolController: +- adv_search_button +- adv_search_clear +- adv_search_load_choice +- adv_search_name +- adv_search_name_typed +- adv_search_toggle +- compare_cancel +- compare_choose_base +- compare_compress +- compare_miq +- compare_miq_all +- compare_miq_differences +- compare_miq_same +- compare_mode +- compare_remove +- compare_set_state +- compare_to_csv +- compare_to_pdf +- compare_to_txt +- exp_button +- exp_changed +- exp_token_pressed +- index +- listnav_search_selected +- quick_search +- save_default_search +- search_clear +- sections_field_changed +- tree_autoload +ResourcePoolCloudController: +- adv_search_button +- adv_search_clear +- adv_search_load_choice +- adv_search_name +- adv_search_name_typed +- adv_search_toggle +- compare_cancel +- compare_choose_base +- compare_compress +- compare_miq +- compare_miq_all +- compare_miq_differences +- compare_miq_same +- compare_mode +- compare_remove +- compare_set_state +- compare_to_csv +- compare_to_pdf +- compare_to_txt +- exp_button +- exp_changed +- exp_token_pressed +- index +- listnav_search_selected +- protect +- quick_search +- report_data +- save_default_search +- search_clear +- sections_field_changed +- show +- show_list +- tagging_edit +- tree_autoload +ResourcePoolInfraController: +- adv_search_button +- adv_search_clear +- adv_search_load_choice +- adv_search_name +- adv_search_name_typed +- adv_search_toggle - compare_cancel - compare_choose_base - compare_compress @@ -1067,8 +1138,20 @@ ResourcePoolController: - compare_to_csv - compare_to_pdf - compare_to_txt +- exp_button +- exp_changed +- exp_token_pressed - index +- listnav_search_selected +- protect +- quick_search +- report_data +- save_default_search +- search_clear - sections_field_changed +- show +- show_list +- tagging_edit - tree_autoload RestfulRedirectController: - index