Skip to content

Commit

Permalink
Renaming of provider_foreman files, code to configuration_manager
Browse files Browse the repository at this point in the history
- Renamed views, controllers and other files to not be specific to provider_foreman
- Renamed methods and actions, routes etc to use `configuration_manager`
- Changed any links to point to `configuration_manager` instead of `provider_foreman`

follow up PR for #6730
  • Loading branch information
h-kataria committed Mar 11, 2020
1 parent d28afd5 commit 8e9a3c3
Show file tree
Hide file tree
Showing 23 changed files with 27 additions and 480 deletions.
8 changes: 4 additions & 4 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def url_for_db(db, action = "show", item = nil)
elsif @host && %w[Patch GuestApplication].include?(db)
return url_for_only_path(:controller => "host", :action => @lastaction, :id => @host, :show => @id)
elsif %w[ConfiguredSystem ConfigurationProfile].include?(db)
return url_for_only_path(:controller => "provider_foreman", :action => @lastaction, :id => @record, :show => @id)
return url_for_only_path(:controller => "configuration_manager", :action => @lastaction, :id => @record, :show => @id)
else
controller, action = db_to_controller(db, action)
return url_for_only_path(:controller => controller, :action => action, :id => @id)
Expand Down Expand Up @@ -282,12 +282,12 @@ def view_to_url(view, parent = nil)
# this is to handle link to a vm in vm explorer from service explorer
return url_for_only_path(:controller => "vm_or_template", :action => "show") + "/"
elsif %w[ConfigurationProfile].include?(view.db) &&
request.parameters[:controller] == "provider_foreman"
request.parameters[:controller] == "configuration_manager"
return url_for_only_path(:action => action, :id => nil) + "/"
elsif %w[ManageIQ::Providers::AutomationManager::InventoryRootGroup EmsFolder].include?(view.db) &&
request.parameters[:controller] == "automation_manager"
return url_for_only_path(:action => action, :id => nil) + "/"
elsif %w[ConfiguredSystem].include?(view.db) && (request.parameters[:controller] == "provider_foreman" || request.parameters[:controller] == "automation_manager")
elsif %w[ConfiguredSystem].include?(view.db) && (request.parameters[:controller] == "configuration_manager" || request.parameters[:controller] == "automation_manager")
return url_for_only_path(:action => action, :id => nil) + "/"
elsif %w[MiqWidget
ConfigurationScript
Expand Down Expand Up @@ -791,7 +791,7 @@ def display_adv_search?
orchestration_stack
persistent_volume
physical_server
provider_foreman
configuration_manager
resource_pool
retired
security_group
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper/page_layouts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def show_adv_search?
orchestration_stack
persistent_volume
physical_server
provider_foreman
configuration_manager
resource_pool
retired
security_group
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper/title.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def title_from_layout(layout)
_("Reports")
when "ops"
_("Configuration")
when "provider_foreman"
when "configuration_manager"
_("Configuration Management")
when "pxe"
_("PXE")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ApplicationHelper::Toolbar::ConfigurationManagerProviderCenter < Applicati
:enabled => true,
:items => [
button(
:provider_foreman_refresh_provider,
:configuration_manager_refresh_provider,
'fa fa-refresh fa-lg',
N_('Refresh relationships for all items related to this Provider'),
N_('Refresh Relationships and Power states'),
Expand All @@ -17,13 +17,13 @@ class ApplicationHelper::Toolbar::ConfigurationManagerProviderCenter < Applicati
:klass => ApplicationHelper::Button::EmsRefresh),
separator,
button(
:provider_foreman_edit_provider,
:configuration_manager_edit_provider,
'pficon pficon-edit fa-lg',
t = N_('Edit this Provider'),
t,
:url => "edit"),
button(
:provider_foreman_delete_provider,
:configuration_manager_delete_provider,
'pficon pficon-delete fa-lg',
t = N_('Remove this Provider from Inventory'),
t,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ApplicationHelper::Toolbar::ConfigurationManagerProvidersCenter < Applicat
:enabled => true,
:items => [
button(
:provider_foreman_refresh_provider,
:configuration_manager_refresh_provider,
'fa fa-refresh fa-lg',
N_('Refresh relationships for all items related to the selected items'),
N_('Refresh Relationships and Power states'),
Expand All @@ -20,14 +20,14 @@ class ApplicationHelper::Toolbar::ConfigurationManagerProvidersCenter < Applicat
:onwhen => "1+"),
separator,
button(
:provider_foreman_add_provider,
:configuration_manager_add_provider,
'pficon pficon-add-circle-o fa-lg',
t = N_('Add a new Provider'),
t,
:enabled => true,
:url => "new"),
button(
:provider_foreman_edit_provider,
:configuration_manager_edit_provider,
'pficon pficon-edit fa-lg',
N_('Select a single item to edit'),
N_('Edit Selected item'),
Expand All @@ -37,7 +37,7 @@ class ApplicationHelper::Toolbar::ConfigurationManagerProvidersCenter < Applicat
:enabled => false,
:onwhen => "1"),
button(
:provider_foreman_delete_provider,
:configuration_manager_delete_provider,
'pficon pficon-delete fa-lg',
t = N_('Remove selected items from Inventory'),
t,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ApplicationHelper::Toolbar::ConfigurationScripts::PolicyMixin
def self.included(included_class)
included_class.button_group('provider_foreman_policy',
[included_class.select(:provider_foreman_policy_choice,
included_class.button_group('configuration_manager_policy',
[included_class.select(:configuration_manager_policy_choice,
nil,
t = N_('Policy'),
t,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module ApplicationHelper::Toolbar::ConfiguredSystem::Foreman::LifecycleMixin
def self.included(included_class)
included_class.button_group('provider_foreman_lifecycle', [
included_class.button_group('configuration_manager_lifecycle', [
included_class.select(
:provider_foreman_lifecycle_choice,
:configuration_manager_lifecycle_choice,
nil,
N_('Lifecycle'),
:enabled => true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module ApplicationHelper::Toolbar::ConfiguredSystem::Foreman::PolicyMixin
def self.included(included_class)
included_class.button_group('provider_foreman_policy', [
included_class.button_group('configuration_manager_policy', [
included_class.select(
:provider_foreman_policy_choice,
:configuration_manager_policy_choice,
nil,
N_('Policy'),
:items => [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
class ApplicationHelper::Toolbar::XForemanConfiguredSystemCenter < ApplicationHelper::Toolbar::Basic
button_group('record_summary', [
select(
:provider_foreman_lifecycle_choice,
:configuration_manager_lifecycle_choice,
nil,
t = N_('Lifecycle'),
t,
:enabled => true,
:items => [
button(
:provider_foreman_configured_system_provision,
:configuration_manager_configured_system_provision,
'pficon pficon-add-circle-o fa-lg',
t = N_('Provision Configured System'),
t,
Expand All @@ -19,7 +19,7 @@ class ApplicationHelper::Toolbar::XForemanConfiguredSystemCenter < ApplicationHe
]
),
select(
:provider_foreman_policy_choice,
:configuration_manager_policy_choice,
nil,
t = N_('Policy'),
t,
Expand Down

This file was deleted.

6 changes: 3 additions & 3 deletions app/helpers/application_helper/toolbar_chooser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def x_view_toolbar_filename
nil
elsif @layout == 'report'
@report ? "report_view_tb" : nil
elsif @layout == 'provider_foreman'
elsif @layout == 'configuration_manager'
@showtype == 'main' ? "x_summary_view_tb" : "x_gtl_view_tb"
elsif %w[vm_infra vm_cloud].include?(@layout)
@showtype == 'main' ? 'x_summary_view_tb' : nil
Expand Down Expand Up @@ -90,7 +90,7 @@ def center_toolbar_name_vm_or_template
def center_toolbar_filename_explorer
if %w[vm_cloud vm_infra vm_or_template].include?(@layout)
center_toolbar_name_vm_or_template
elsif @layout == "provider_foreman" && %i[configuration_manager_providers_tree configuration_manager_cs_filter_tree].include?(x_active_tree)
elsif @layout == "configuration_manager" && %i[configuration_manager_providers_tree configuration_manager_cs_filter_tree].include?(x_active_tree)
center_toolbar_filename_configuration_manager_providers
elsif @layout == "automation_manager"
center_toolbar_filename_automation_manager
Expand Down Expand Up @@ -634,7 +634,7 @@ def unassigned_configuration_profile_node(nodes)
miq_policy
miq_policy_rsop
ops
provider_foreman
configuration_manager
pxe
report].to_set.freeze

Expand Down
Loading

0 comments on commit 8e9a3c3

Please sign in to comment.