From 304da5595e58a61fb8dcd2eea640b38cadbedb18 Mon Sep 17 00:00:00 2001 From: Harpreet Kataria Date: Tue, 24 Mar 2020 16:15:39 -0400 Subject: [PATCH] Addressing rubocop warnings --- app/controllers/application_controller/explorer.rb | 2 +- app/controllers/configured_system_controller.rb | 4 ++-- app/helpers/configuration_manager_helper/textual_summary.rb | 4 +++- app/helpers/configured_system_helper/textual_summary.rb | 1 - app/presenters/menu/default_menu.rb | 6 +++--- app/views/configuration_manager/new.html.haml | 1 - 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/controllers/application_controller/explorer.rb b/app/controllers/application_controller/explorer.rb index 0dd7bd727a38..7326fcf78d64 100644 --- a/app/controllers/application_controller/explorer.rb +++ b/app/controllers/application_controller/explorer.rb @@ -43,7 +43,7 @@ def x_history 'start' => :s1, 'stop' => :s1, 'suspend' => :s1, 'reset' => :s1, 'terminate' => :s1, 'pause' => :s1, 'shelve' => :s1, 'shelve_offload' => :s1, 'chargeback' => :s1, - 'manager_pause' => :s1, 'manager_resume' => :s1, + 'manager_pause' => :s1, 'manager_resume' => :s1, # group 2 'clone' => :s2, 'compare' => :s2, 'drift' => :s2, diff --git a/app/controllers/configured_system_controller.rb b/app/controllers/configured_system_controller.rb index 85f52c834971..a57476bcbf87 100644 --- a/app/controllers/configured_system_controller.rb +++ b/app/controllers/configured_system_controller.rb @@ -45,8 +45,8 @@ def provision :escape => false) else render_flash(n_("No common configuration profiles available for the selected configured system", - "No common configuration profiles available for the selected configured systems", - provisioning_ids.size), :error) + "No common configuration profiles available for the selected configured systems", + provisioning_ids.size), :error) end end diff --git a/app/helpers/configuration_manager_helper/textual_summary.rb b/app/helpers/configuration_manager_helper/textual_summary.rb index ced56be2b080..a28e663a39e9 100644 --- a/app/helpers/configuration_manager_helper/textual_summary.rb +++ b/app/helpers/configuration_manager_helper/textual_summary.rb @@ -8,11 +8,13 @@ def textual_group_properties def textual_description return nil if @record.try(:description).blank? + {:label => _("Description"), :value => @record.description} end def textual_region return nil if @record.provider_region.blank? + label_val = _('Region') {:label => label_val, :value => @record.provider_region} end @@ -23,6 +25,7 @@ def textual_hostname def textual_ipaddress return nil if @record.ipaddress.blank? + {:label => _("Discovered IP Address"), :value => @record.ipaddress} end @@ -69,5 +72,4 @@ def textual_group_status def textual_group_tags %i[tags] end - end diff --git a/app/helpers/configured_system_helper/textual_summary.rb b/app/helpers/configured_system_helper/textual_summary.rb index c22fdb616043..947ac1c3af82 100644 --- a/app/helpers/configured_system_helper/textual_summary.rb +++ b/app/helpers/configured_system_helper/textual_summary.rb @@ -117,5 +117,4 @@ def textual_configuration_organizations_name :value => (@record.configuration_profile.try(:configuration_organizations) || []).collect(&:name).join(", ") } end - end diff --git a/app/presenters/menu/default_menu.rb b/app/presenters/menu/default_menu.rb index e8a9f639df93..b0fa7315cbf7 100644 --- a/app/presenters/menu/default_menu.rb +++ b/app/presenters/menu/default_menu.rb @@ -13,9 +13,9 @@ def compute_menu_section def configuration_menu_section Menu::Section.new(:conf, N_("Configuration"), 'fa fa-cog', [ - Menu::Item.new('configuration_manager', N_('Providers'), 'configuration_manager', {:feature => 'configuration_manager_show_list'}, '/configuration_manager/show_list'), - Menu::Item.new('configuration_profile', N_('Profiles'), 'configuration_profile', {:feature => 'configuration_profile_show_list'}, '/configuration_profile/show_list'), - Menu::Item.new('configured_system', N_('Configured Systems'), 'configured_system', {:feature => 'configured_system_show_list'}, '/configured_system/show_list'), + Menu::Item.new('configuration_manager', N_('Providers'), 'configuration_manager', {:feature => 'configuration_manager_show_list'}, '/configuration_manager/show_list'), + Menu::Item.new('configuration_profile', N_('Profiles'), 'configuration_profile', {:feature => 'configuration_profile_show_list'}, '/configuration_profile/show_list'), + Menu::Item.new('configured_system', N_('Configured Systems'), 'configured_system', {:feature => 'configured_system_show_list'}, '/configured_system/show_list'), ]) end diff --git a/app/views/configuration_manager/new.html.haml b/app/views/configuration_manager/new.html.haml index 28c2f4072434..4b6255b467df 100644 --- a/app/views/configuration_manager/new.html.haml +++ b/app/views/configuration_manager/new.html.haml @@ -1,2 +1 @@ = render :partial => 'configuration_manager/shared_form' -