Skip to content

Commit

Permalink
Revert "Merge pull request ManageIQ#8929 from Guddetisandeep/master"
Browse files Browse the repository at this point in the history
This reverts commit 7fcec09, reversing
changes made to 9fbcf7b.
  • Loading branch information
agrare committed Aug 30, 2024
1 parent da5a85c commit ec2101e
Show file tree
Hide file tree
Showing 41 changed files with 76 additions and 1,335 deletions.
9 changes: 2 additions & 7 deletions app/controllers/application_controller/ci_processing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -852,13 +852,8 @@ def delete_flavors
end

# Delete all selected or single displayed RP(s)
def deletecloudresourcepools
assert_privileges("resource_pool_cloud_delete")
delete_elements(ResourcePool, :process_resourcepools)
end

def deleteinfraresourcepools
assert_privileges("resource_pool_infra_delete")
def deleteresourcepools
assert_privileges("resource_pool_delete")
delete_elements(ResourcePool, :process_resourcepools)
end

Expand Down
1 change: 0 additions & 1 deletion app/controllers/mixins/ems_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ def display_methods
physical_switches
physical_storages
placement_groups
resource_pools_cloud
security_groups
security_policies
security_policy_rules
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/mixins/generic_show_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ def display_custom_button_events
nested_list(CustomButtonEvent, :breadcrumb_title => _('Custom Button Events'), :clickable => false, :parent_method => 'custom_button_events')
end

def display_resource_pools_cloud
nested_list(ManageIQ::Providers::CloudManager::ResourcePool, :breadcrumb_title => _('Resource Pools'))
def display_resource_pools
nested_list(ResourcePool)
end

def display_instances
Expand Down
102 changes: 0 additions & 102 deletions app/controllers/resource_pool_cloud_controller.rb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ResourcePoolInfraController < ApplicationController
class ResourcePoolController < ApplicationController
before_action :check_privileges
before_action :get_session_data
after_action :cleanup_action
Expand All @@ -21,57 +21,27 @@ def button

@refresh_div = 'main_div' unless @display # Default div for button.rjs to refresh
case params[:pressed]
when 'resource_pool_infra_delete'
deleteinfraresourcepools
when 'resource_pool_delete'
deleteresourcepools
if @refresh_div == 'main_div' && @lastaction == 'show_list'
replace_gtl_main_div
else
render_flash unless performed?
end
when 'resource_pool_infra_protect'
when 'resource_pool_protect'
assign_policies(ResourcePool)
when 'resource_pool_infra_tag'
tag(self.class.model)
else
super
end
end

def self.model
ManageIQ::Providers::InfraManager::ResourcePool
end

def self.table_name
@table_name ||= "resource_pool"
end

def breadcrumb_name(_model)
_("Infrastructure Resource Pools")
end

def download_data
assert_privileges('resource_pool_infra_view')
assert_privileges('resource_pool_show_list')
super
end

def download_summary_pdf
assert_privileges('resource_pool_infra_view')
super
end

def index
redirect_to(:action => 'show_list')
end

def show_list
assert_privileges('resource_pool_infra_show_list')
@center_toolbar = "resource_pool_infras"
super
end

def show
assert_privileges('resource_pool_infra_show')
@center_toolbar = "resource_pool_infra"
assert_privileges('resource_pool_show')
super
end

Expand All @@ -84,7 +54,6 @@ def record_class
def textual_group_list
[%i[properties relationships], %i[configuration smart_management]]
end

helper_method :textual_group_list

def breadcrumbs_options
Expand All @@ -97,6 +66,6 @@ def breadcrumbs_options
}
end

menu_section :resource_pool_infra
menu_section :inf
feature_for_actions "#{controller_name}_show_list", *ADV_SEARCH_ACTIONS
end
4 changes: 0 additions & 4 deletions app/controllers/vm_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,6 @@ def placement_group
show_association('placement_groups', _('Placement Groups'), :placement_groups, PlacementGroup)
end

def resource_pool
show_association('resource_pools', _('Resource Pools'), :resource_pools, ResourcePool)
end

def cloud_subnets
show_association('cloud_subnets', _('Subnets'), :cloud_subnets, CloudSubnet)
end
Expand Down
7 changes: 1 addition & 6 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,6 @@ def db_to_controller(db, action = "show")
when "PlacementGroup"
controller = "placement_group"
action = "show"
when "ManageIQ::Providers::CloudManager::ResourcePool"
controller = "resource_pool_cloud"
when "ManageIQ::Providers::InfraManager::ResourcePool"
controller = "resource_pool_infra"
when "SecurityGroup"
controller = "security_group"
action = "show"
Expand Down Expand Up @@ -800,8 +796,7 @@ def display_adv_search?
physical_server
placement_group
provider_foreman
resource_pool_cloud
resource_pool_infra
resource_pool
retired
security_group
security_policy
Expand Down
3 changes: 1 addition & 2 deletions app/helpers/application_helper/listnav.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ def render_listnav_filename
physical_server
physical_storage
physical_switch
resource_pool_cloud
resource_pool_infra
resource_pool
security_group
security_policy
security_policy_rule
Expand Down
3 changes: 1 addition & 2 deletions app/helpers/application_helper/page_layouts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ def show_adv_search?
physical_server
physical_storage
placement_group
resource_pool_cloud
resource_pool_infra
resource_pool
retired
security_group
security_policy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ApplicationHelper::Toolbar::ResourcePoolInfraCenter < ApplicationHelper::Toolbar::Basic
class ApplicationHelper::Toolbar::ResourcePoolCenter < ApplicationHelper::Toolbar::Basic
button_group('resource_pool_vmdb', [
select(
:resource_pool_vmdb_choice,
Expand All @@ -7,7 +7,7 @@ class ApplicationHelper::Toolbar::ResourcePoolInfraCenter < ApplicationHelper::T
t,
:items => [
button(
:resource_pool_infra_delete,
:resource_pool_delete,
'pficon pficon-delete fa-lg',
N_('Remove this Resource Pool from Inventory'),
N_('Remove Resource Pool from Inventory'),
Expand All @@ -24,12 +24,12 @@ class ApplicationHelper::Toolbar::ResourcePoolInfraCenter < ApplicationHelper::T
t,
:items => [
button(
:resource_pool_infra_protect,
:resource_pool_protect,
'pficon pficon-edit fa-lg',
N_('Manage Policies for this Resource Pool'),
N_('Manage Policies')),
button(
:resource_pool_infra_tag,
:resource_pool_tag,
'pficon pficon-edit fa-lg',
N_('Edit Tags for this Resource Pool'),
N_('Edit Tags')),
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit ec2101e

Please sign in to comment.