diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 380ceeb818f..00e59d86b9f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -431,12 +431,6 @@ def report_data @view.table = filter_parent_name_tenant(@view.table) end - # Foreman has some unassigned rows which needs to be added after view is fetched - if options && options[:unassigned_profile_row] && options[:unassigned_configuration_profile] - options[:unassigned_profile_row][:id] ||= options[:unassigned_profile_row]['manager_id'] - @view.table.data.push(options[:unassigned_profile_row]) - @targets_hash[options[:unassigned_profile_row]['id']] = options[:unassigned_configuration_profile] - end render :json => { :settings => settings, :data => view_to_hash(@view, true), @@ -1990,8 +1984,6 @@ def controller_for_common_methods "vm" when 'automation_manager' "automation_manager_provider" - when 'provider_foreman' - "configuration_manager_provider" when "generic_object_definition" # tagging for nested list on the generic object class "generic_object" when "ansible_playbook" diff --git a/app/controllers/application_controller/ci_processing.rb b/app/controllers/application_controller/ci_processing.rb index b64b8809f40..b722fc2f094 100644 --- a/app/controllers/application_controller/ci_processing.rb +++ b/app/controllers/application_controller/ci_processing.rb @@ -306,7 +306,7 @@ def manager_button_operation(method, display_name) def process_managers(managers, task) controller_class = request.parameters[:controller] provider_class = case controller_class - when 'configuration_manager', 'provider_foreman' then ManageIQ::Providers::ConfigurationManager + when 'configuration_manager' then ManageIQ::Providers::ConfigurationManager when 'automation_manager' then ManageIQ::Providers::AutomationManager end diff --git a/app/controllers/application_controller/explorer.rb b/app/controllers/application_controller/explorer.rb index 4699050a03d..0dd7bd727a3 100644 --- a/app/controllers/application_controller/explorer.rb +++ b/app/controllers/application_controller/explorer.rb @@ -43,8 +43,7 @@ def x_history 'start' => :s1, 'stop' => :s1, 'suspend' => :s1, 'reset' => :s1, 'terminate' => :s1, 'pause' => :s1, 'shelve' => :s1, 'shelve_offload' => :s1, 'chargeback' => :s1, - 'foreman_pause' => :s1, 'foreman_resume' => :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/configuration_profile_controller.rb b/app/controllers/configuration_profile_controller.rb index a0a3eb4733d..9c45e8fe0e0 100644 --- a/app/controllers/configuration_profile_controller.rb +++ b/app/controllers/configuration_profile_controller.rb @@ -9,10 +9,6 @@ class ConfigurationProfileController < ApplicationController after_action :cleanup_action after_action :set_session_data - def self.model - ManageIQ::Providers::Foreman::ConfigurationManager::ConfigurationProfile - end - def self.table_name @table_name ||= "configuration_profile" end diff --git a/app/controllers/configured_system_controller.rb b/app/controllers/configured_system_controller.rb index 2d3cb1f608b..85f52c83497 100644 --- a/app/controllers/configured_system_controller.rb +++ b/app/controllers/configured_system_controller.rb @@ -9,10 +9,6 @@ class ConfiguredSystemController < ApplicationController after_action :cleanup_action after_action :set_session_data - def self.model - ManageIQ::Providers::Foreman::ConfigurationManager::ConfiguredSystem - end - def self.table_name @table_name ||= "configured_system" end diff --git a/app/controllers/provider_foreman_controller.rb b/app/controllers/provider_foreman_controller.rb deleted file mode 100644 index 13c20aa1d3c..00000000000 --- a/app/controllers/provider_foreman_controller.rb +++ /dev/null @@ -1,522 +0,0 @@ -class ProviderForemanController < ApplicationController - before_action :check_privileges - before_action :get_session_data - - after_action :cleanup_action - after_action :set_session_data - - include Mixins::GenericSessionMixin - include Mixins::ManagerControllerMixin - include Mixins::AutomationManagerControllerMixin - include Mixins::ExplorerPresenterMixin - include Mixins::EmsCommon::Core - include Mixins::EmsCommon::PauseResume - include Mixins::BreadcrumbsMixin - - def self.model - ManageIQ::Providers::ConfigurationManager - end - - def self.table_name - @table_name ||= "provider_foreman" - end - - def self.model_to_name(provmodel) - if provmodel.include?("ManageIQ::Providers::Foreman") - Dictionary.gettext('foreman', :type => :ui_title, :translate => false) - end - end - - def concrete_model - ManageIQ::Providers::ConfigurationManager - end - - def managed_group_kls - ConfigurationProfile - end - - def manager_prefix - 'configuration_manager' - end - - def privilege_prefix - 'provider_foreman' - end - - def provision - assert_privileges("provider_foreman_configured_system_provision") if x_active_accord == :configuration_manager_providers - assert_privileges("configured_system_provision") if x_active_accord == :configuration_manager_cs_filter - provisioning_ids = find_records_with_rbac(ConfiguredSystem, checked_or_params).ids - - unless ConfiguredSystem.provisionable?(provisioning_ids) - add_flash(_("Provisioning is not supported for at least one of the selected systems"), :error) - replace_right_cell - return - end - - if ConfiguredSystem.common_configuration_profiles_for_selected_configured_systems(provisioning_ids) - javascript_redirect(:controller => "miq_request", - :action => "prov_edit", - :prov_id => provisioning_ids, - :org_controller => "configured_system", - :escape => false) - else - add_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) - replace_right_cell - end - end - - def tagging - @explorer = true - case x_active_accord - when :configuration_manager_providers - assert_privileges("configuration_manager_provider_tag") - tagging_edit(class_for_provider_node.to_s, false) - when :configuration_manager_cs_filter - assert_privileges("configured_system_tag") - tagging_edit('ConfiguredSystem', false) - end - render_tagging_form - end - - def load_or_clear_adv_search - adv_search_build(model_from_active_tree(x_active_tree)) - session[:edit] = @edit - @explorer = true - - if x_active_tree == :configuration_manager_cs_filter_tree && params[:button] != 'saveit' # Configured Systems accordion - @nodetype, id = parse_nodetype_and_id(valid_active_node(x_node)) - search_id = @nodetype == "root" ? 0 : id - search_id = @edit[@expkey][:selected][:id] if params[:button] == "save" - listnav_search_selected(search_id) if !params.key?(:search_text) && params[:action] != 'x_show' # Clear or set the adv search filter - if @edit[:adv_search_applied] && - MiqExpression.quick_search?(@edit[:adv_search_applied][:exp]) && - %w[reload tree_select].include?(params[:action]) - self.x_node = params[:id] - quick_search_show # User will input the value - end - elsif provider_active_tree? && x_node != 'root' # Providers accordion, without Advanced Search - listnav_search_selected(0) - end - end - - # Display provider through Tenant's textual summary - def show - @explorer = true - @lastaction = "explorer" - - build_accordions_and_trees - - params[:action] = 'tree-select' - provider_node(params[:id], ExtManagementSystem.find_by(:id => params[:id]).type) - - render :layout => "application" - end - - def x_show - tree_record unless unassigned_configuration_profile?(params[:id]) - - if request.format.js? && !@record - check_for_unassigned_configuration_profile - return - end - - generic_x_show - end - - def tree_record - @record = case x_active_tree - when :configuration_manager_providers_tree then configuration_manager_providers_tree_rec - when :configuration_manager_cs_filter_tree then configuration_manager_cs_filter_tree_rec - end - end - - def check_for_unassigned_configuration_profile - if action_name == "x_show" - unassigned_configuration_profile?(params[:id]) ? tree_select : tree_select_unprovisioned_configured_system - elsif action_name == "tree_select" - tree_select_unprovisioned_configured_system - else - redirect_to(:action => "explorer") - end - end - - def tree_select_unprovisioned_configured_system - if unassigned_configuration_profile?(x_node) - params[:id] = "cs-#{params[:id]}" - tree_select - else - redirect_to(:action => "explorer") - end - end - - def class_for_provider_node - nodes = x_node.split('-') - case nodes.first - when "root" then ManageIQ::Providers::ConfigurationManager - when "fr" then ConfigurationProfile - when "cp", "cs" then ConfiguredSystem - when "xx" then - case nodes.second - when "fr" then ManageIQ::Providers::ConfigurationManager - when "csf" then ConfiguredSystem - end - else - nodes.include?("unassigned") ? ConfiguredSystem : ManageIQ::Providers::ConfigurationManager - end - end - - def configuration_manager_providers_tree_rec - find_record(class_for_provider_node, params[:id]) - end - - def configuration_manager_cs_filter_tree_rec - nodes = x_node.split('-') - case nodes.first - when "root", "xx" then find_record(ConfiguredSystem, params[:id]) - when "ms" then find_record(ConfiguredSystem, params[:id]) - end - end - - def show_record(_id = nil) - @display = params[:display] || "main" unless pagination_or_gtl_request? - @lastaction = "show" - - if @record.nil? - add_flash(_("Error: Record no longer exists in the database"), :error) - if request.xml_http_request? && params[:id] # Is this an Ajax request clicking on a node that no longer exists? - @delete_node = params[:id] # Set node to be removed from the tree - end - return - end - - return unless @display == 'main' - @showtype = "main" - end - - def validate_before_save? - true - end - - def provider_active_tree? - x_active_tree == :configuration_manager_providers_tree - end - helper_method(:provider_active_tree?) - - private - - def provider_foreman_pause - pause_or_resume_emss(:pause => true) - end - - def provider_foreman_resume - pause_or_resume_emss(:resume => true) - end - - def textual_group_list - [%i[properties environment os], %i[tenancy tags]] - end - helper_method :textual_group_list - - def provider_class - ManageIQ::Providers::Foreman::Provider - end - - def features - [ - { - :role => "providers_accord", - :role_any => true, - :name => :configuration_manager_providers, - :title => _("Providers") - }, - { - :role => "configured_systems_filter_accord", - :role_any => true, - :name => :configuration_manager_cs_filter, - :title => _("Configured Systems") - } - ].map { |hsh| ApplicationController::Feature.new_with_hash(hsh) } - end - - def get_node_info(treenodeid, show_list = true) - @sb[:action] = nil - @nodetype, id = parse_nodetype_and_id(valid_active_node(treenodeid)) - @show_list = show_list - - model = TreeBuilder.get_model_for_prefix(@nodetype) - if model == "Hash" - model = TreeBuilder.get_model_for_prefix(id) - id = nil - end - - options = case model - when "ManageIQ::Providers::Foreman::ConfigurationManager" - provider_list(id, model) - when "ConfigurationProfile" - configuration_profile_node(id, model) - when "ManageIQ::Providers::Foreman::ConfigurationManager::ConfiguredSystem", "ConfiguredSystem" - configured_system_list(id, model) - when "MiqSearch" - miq_search_node - else - if unassigned_configuration_profile?(treenodeid) - configuration_profile_node(id, model) - else - default_node - end - end - @right_cell_text += _(" (Names with \"%{search_text}\")") % {:search_text => @search_text} if @search_text.present? - @right_cell_text += @edit[:adv_search_applied][:text] if x_tree && x_tree[:tree] == :configuration_manager_cs_filter_tree && @edit && @edit[:adv_search_applied] - - if @view && @pages - {:view => @view, :pages => @pages} - else - options - end - end - - def provider_node(id, model) - @record = provider = find_record(ExtManagementSystem, id) - if provider.nil? - self.x_node = "root" - get_node_info("root") - else - @no_checkboxes = true - case @record.type - when "ManageIQ::Providers::Foreman::ConfigurationManager" - options = {:model => "ConfigurationProfile", :match_via_descendants => 'ConfiguredSystem', :named_scope => [[:with_manager, provider.id]]} - @show_list ? process_show_list(options) : options.merge!(update_options) - unassigned_profiles = add_unassigned_configuration_profile_record(provider.id) - options.merge!(unassigned_profiles) unless unassigned_profiles.nil? - record_model = ui_lookup(:model => self.class.model_to_name(model || TreeBuilder.get_model_for_prefix(@nodetype))) - @right_cell_text = _("Configuration Profiles under %{record_model} Provider \"%{name}\"") % { - :name => provider.name, - :record_model => record_model - } - end - end - options - end - - def configuration_profile_node(id, model) - @record = @configuration_profile_record = model ? find_record(ConfigurationProfile, id) : ConfigurationProfile.new - if @configuration_profile_record.nil? - self.x_node = "root" - get_node_info("root") - else - options = {:model => "ConfiguredSystem"} - options[:named_scope] = if empty_configuration_profile_record?(@configuration_profile_record) - [[:with_manager, id], [:without_configuration_profile_id]] - else - [[:with_configuration_profile_id, @configuration_profile_record.id]] - end - @show_list ? process_show_list(options) : options.merge!(update_options) - record_model = ui_lookup(:model => model || TreeBuilder.get_model_for_prefix(@nodetype)) - if @sb[:active_tab] == 'configured_systems' - configuration_profile_right_cell_text(model) - else - @showtype = 'main' - @pages = nil - @right_cell_text = _("%{model} \"%{name}\"") % {:name => @configuration_profile_record.name, :model => record_model} - end - end - options - end - - def default_node - return unless x_node == "root" - if provider_active_tree? - options = {:model => "ManageIQ::Providers::ConfigurationManager"} - @show_list ? process_show_list(options) : options.merge!(update_options) - @right_cell_text = _("All Configuration Management Providers") - elsif x_active_tree == :configuration_manager_cs_filter_tree - options = {:model => "ConfiguredSystem"} - @show_list ? process_show_list(options) : options.merge!(update_options) - @right_cell_text = _("All Configured Systems") - end - options - end - - def rebuild_trees(replace_trees) - build_replaced_trees(replace_trees, %i[configuration_manager_providers configuration_manager_cs_filter]) - end - - def leaf_record - get_node_info(x_node) - @delete_node = params[:id] if @replace_trees - type, _id = parse_nodetype_and_id(x_node) - type && %w[ConfiguredSystem].include?(TreeBuilder.get_model_for_prefix(type)) - end - - def configuration_profile_record?(node = x_node) - type, _id = parse_nodetype_and_id(node) - type && %w[ConfigurationProfile].include?(TreeBuilder.get_model_for_prefix(type)) - end - - def foreman_provider_record?(node = x_node) - node = node.split("-").last if node.split("-").first == 'xx' - type, _id = node.split("-") - type && ["ManageIQ::Providers::Foreman::ConfigurationManager"].include?(TreeBuilder.get_model_for_prefix(type)) - end - - def provider_record?(node = x_node) - foreman_provider_record?(node) - end - - def search_text_type(node) - return "provider" if provider_record?(node) - return "configuration_profile" if configuration_profile_record?(node) - node - end - - def update_partials(record_showing, presenter) - if record_showing && valid_configured_system_record?(@configured_system_record) - get_tagdata(@record) - presenter.hide(:form_buttons_div) - presenter.update(:main_div, r[:partial => "layouts/textual_groups_generic"]) - elsif @in_a_form - partial_locals = {:controller => controller_name} - @right_cell_text = - if @sb[:action] == "#{controller_name}_add_provider" - _("Add a new Configuration Management Provider") - elsif @sb[:action] == "#{controller_name}_edit_provider" - _("Edit Provider") - end - partial = 'form' - presenter.update(:main_div, r[:partial => partial, :locals => partial_locals]) - elsif valid_configuration_profile_record?(@configuration_profile_record) - presenter.hide(:form_buttons_div) - presenter.update(:main_div, r[:partial => "configuration_profile", - :locals => {:controller => controller_name}]) - elsif ManageIQ::Providers::ConfigurationManager.none? && provider_active_tree? - presenter.update(:main_div, r[:partial => "layouts/empty", - :locals => {:add_message => _("Add a new Configuration Management Provider"), - :documentation => ::Settings.docs.configuration_provider}]) - else - presenter.update(:main_div, r[:partial => 'layouts/x_gtl']) - end - presenter.update(:breadcrumbs, r[:partial => 'layouts/breadcrumbs']) - - replace_search_box(presenter, :nameonly => provider_active_tree?) - end - - def group_summary_tab_selected? - @configuration_profile_record && @sb[:active_tab] == 'summary' - end - - def active_tab_configured_systems? - (%w[x_show x_search_by_name].include?(action_name) && configuration_profile_record?) || - unassigned_configuration_profile?(x_node) - end - - def unassigned_configuration_profile?(node) - _type, _pid, nodeinfo = parse_nodetype_and_id(node) - nodeinfo == "unassigned" - end - - def empty_configuration_profile_record?(configuration_profile_record) - configuration_profile_record.try(:id).nil? - end - - def valid_configuration_profile_record?(configuration_profile_record) - configuration_profile_record.try(:id) - end - - def list_row_id(row) - if row['name'] == _("Unassigned Profiles Group") && row['id'].nil? - "-#{row['manager_id']}-unassigned" - else - row['id'].to_s - end - end - - def configuration_profile_right_cell_text(model) - record_model = ui_lookup(:model => model || TreeBuilder.get_model_for_prefix(@nodetype)) - return if @sb[:active_tab] != 'configured_systems' - @right_cell_text = if valid_configuration_profile_record?(@configuration_profile_record) - _("Configured Systems under %{record_model} \"%{name}\"") % - {:record_model => record_model, - :name => @configuration_profile_record.name} - else - _("Configured Systems under Unassigned Profiles Group") - end - end - - def add_unassigned_configuration_profile_record(provider_id) - unprovisioned_configured_systems = - ConfiguredSystem.where(:manager_id => provider_id, :configuration_profile_id => nil).count - - return if unprovisioned_configured_systems.zero? - - unassigned_configuration_profile_desc = unassigned_configuration_profile_name = _("Unassigned Profiles Group") - unassigned_configuration_profile = ConfigurationProfile.new - unassigned_configuration_profile.manager_id = provider_id - unassigned_configuration_profile.name = unassigned_configuration_profile_name - unassigned_configuration_profile.description = unassigned_configuration_profile_desc - - unassigned_profile_row = { - 'x_show_id' => "-#{provider_id}-unassigned", - 'description' => unassigned_configuration_profile_desc, - 'total_configured_systems' => unprovisioned_configured_systems, - 'configuration_environment_name' => unassigned_configuration_profile.configuration_environment_name, - 'my_zone' => unassigned_configuration_profile.my_zone, - 'region_description' => unassigned_configuration_profile.region_description, - 'name' => unassigned_configuration_profile_name, - 'manager_id' => provider_id - } - - unless @view.table.kind_of?(Hash) - add_unassigned_configuration_profile_record_to_view(unassigned_profile_row, unassigned_configuration_profile) - end - { - :unassigned_profile_row => unassigned_profile_row, - :unassigned_configuration_profile => unassigned_configuration_profile - } - end - - def add_unassigned_configuration_profile_record_to_view(unassigned_profile_row, unassigned_configuration_profile) - @view.table.data.push(unassigned_profile_row) - @targets_hash[unassigned_profile_row['id']] = unassigned_configuration_profile - end - - def update_options(options = {}) - options ||= {} - options[:dbname] = case x_active_accord - when :configuration_manager_providers - case options[:model] - when 'ConfiguredSystem' - :cm_configured_systems - when 'ConfigurationProfile' - :cm_configuration_profiles - else - :cm_providers - end - when :configuration_manager_cs_filter - :cm_configured_systems - end - options[:gtl_dbname] = options[:dbname] - options - end - private :update_options - - def process_show_list(options = {}) - options.merge!(update_options(options)) - process_show_list_options(options) - super - end - - def breadcrumbs_options - { - :breadcrumbs => [ - {:title => _("Configuration")}, - {:title => _("Management")}, - ], - :record_title => :hostname, - } - end - - menu_section :conf -end diff --git a/app/controllers/restful_redirect_controller.rb b/app/controllers/restful_redirect_controller.rb index cc3a973f0c3..6483a029115 100644 --- a/app/controllers/restful_redirect_controller.rb +++ b/app/controllers/restful_redirect_controller.rb @@ -6,9 +6,7 @@ def index when 'ExtManagementSystem' record = ExtManagementSystem.find_by(:id => params[:id]) if record - if %w[ManageIQ::Providers::ConfigurationManager].include?(record.type) || record.type.starts_with?('ManageIQ::Providers::Foreman') - redirect_to(:controller => 'provider_foreman', :action => 'show', :id => params[:id]) - elsif %w[ManageIQ::Providers::AnsibleTower::AutomationManager].include?(record.type) + if %w[ManageIQ::Providers::AnsibleTower::AutomationManager].include?(record.type) redirect_to(:controller => 'automation_manager', :action => 'show', :id => params[:id]) elsif %w[ManageIQ::Providers::EmbeddedAnsible::AutomationManager].include?(record.type) redirect_to(:controller => 'ansible_playbook', :action => 'show_list') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e20988fa907..f55e6634cc3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -218,8 +218,6 @@ def url_for_db(db, action = "show", item = nil) :show => @id) 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) else controller, action = db_to_controller(db, action) return url_for_only_path(:controller => controller, :action => action, :id => @id) @@ -284,14 +282,9 @@ def view_to_url(view, parent = nil) elsif ["Vm"].include?(view.db) && parent && request.parameters[:controller] != "vm" # 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" - 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") - return url_for_only_path(:action => action, :id => nil) + "/" elsif %w[MiqWidget ConfigurationScript MiqReportResult].include?(view.db) && @@ -423,11 +416,10 @@ def db_to_controller(db, action = "show") controller = "ansible_credential" when "MiqWorker" controller = request.parameters[:controller] - when "OrchestrationStackOutput", "OrchestrationStackParameter", "OrchestrationStackResource", + when "ConfigurationProfile", "ConfiguredSystem", + "OrchestrationStackOutput", "OrchestrationStackParameter", "OrchestrationStackResource", "ManageIQ::Providers::CloudManager::OrchestrationStack", "ManageIQ::Providers::ConfigurationManager", - "ManageIQ::Providers::Foreman::ConfigurationManager::ConfigurationProfile", - "ManageIQ::Providers::Foreman::ConfigurationManager::ConfiguredSystem", "ManageIQ::Providers::AnsibleTower::AutomationManager::Job", "ConfigurationScript" controller = request.parameters[:controller] when "ContainerVolume" @@ -808,7 +800,6 @@ def display_adv_search? orchestration_stack persistent_volume physical_server - provider_foreman resource_pool retired security_group @@ -928,11 +919,6 @@ def model_from_active_tree(tree) case tree when :automation_manager_cs_filter_tree "ManageIQ::Providers::AnsibleTower::AutomationManager::ConfiguredSystem" - when :configuration_manager_cs_filter_tree - "ManageIQ::Providers::Foreman::ConfigurationManager::ConfiguredSystem" - when :configuration_manager_providers_tree - "ManageIQ::Providers::Foreman::ConfigurationManager" if x_node.include?("fr") - "ManageIQ::Providers::ConfigurationManager" if x_node == "root" when :instances_filter_tree "ManageIQ::Providers::CloudManager::Vm" when :images_filter_tree @@ -954,8 +940,6 @@ def configuration_manager_scripts_tree(tree) case tree when :automation_manager_cs_filter_tree, :automation_manager_providers_tree "ManageIQ::Providers::AnsibleTower::AutomationManager::ConfiguredSystem" - when :configuration_manager_cs_filter_tree - "ManageIQ::Providers::Foreman::ConfigurationManager::ConfiguredSystem" when :configuration_scripts_tree "ConfigurationScript" end diff --git a/app/helpers/application_helper/page_layouts.rb b/app/helpers/application_helper/page_layouts.rb index c813b12c895..c2285b0e97b 100644 --- a/app/helpers/application_helper/page_layouts.rb +++ b/app/helpers/application_helper/page_layouts.rb @@ -225,7 +225,6 @@ def show_adv_search? orchestration_stack persistent_volume physical_server - provider_foreman resource_pool retired security_group diff --git a/app/helpers/application_helper/title.rb b/app/helpers/application_helper/title.rb index c351dffe02e..da7e589d744 100644 --- a/app/helpers/application_helper/title.rb +++ b/app/helpers/application_helper/title.rb @@ -75,8 +75,6 @@ def title_from_layout(layout) _("Reports") when "ops" _("Configuration") - when "provider_foreman" - _("Configuration Management") when "pxe" _("PXE") when "switch" diff --git a/app/helpers/application_helper/toolbar/configuration_managers_center.rb b/app/helpers/application_helper/toolbar/configuration_managers_center.rb index 8e80ccbc177..d13ab79457a 100644 --- a/app/helpers/application_helper/toolbar/configuration_managers_center.rb +++ b/app/helpers/application_helper/toolbar/configuration_managers_center.rb @@ -59,7 +59,7 @@ class ApplicationHelper::Toolbar::ConfigurationManagersCenter < ApplicationHelpe button( :configuration_manager_tag, 'pficon pficon-edit fa-lg', - N_('Edit Tags for this Foreman Provider'), + N_('Edit Tags for this Configuration Manager Provider'), N_('Edit Tags'), :url_parms => "main_div", :send_checked => true, diff --git a/app/helpers/application_helper/toolbar/configured_system/foreman/lifecycle_mixin.rb b/app/helpers/application_helper/toolbar/configured_system/foreman/lifecycle_mixin.rb deleted file mode 100644 index dc3b9a07f7a..00000000000 --- a/app/helpers/application_helper/toolbar/configured_system/foreman/lifecycle_mixin.rb +++ /dev/null @@ -1,24 +0,0 @@ -module ApplicationHelper::Toolbar::ConfiguredSystem::Foreman::LifecycleMixin - def self.included(included_class) - included_class.button_group('provider_foreman_lifecycle', [ - included_class.select( - :provider_foreman_lifecycle_choice, - nil, - N_('Lifecycle'), - :enabled => true, - :items => [ - included_class.button( - :configured_system_provision, - 'pficon pficon-add-circle-o fa-lg', - N_('Provision Configured Systems'), - :url => "provision", - :url_parms => "main_div", - :send_checked => true, - :enabled => false, - :onwhen => "1+", - :klass => ApplicationHelper::Button::ConfiguredSystemProvision), - ] - ), - ]) - end -end diff --git a/app/helpers/application_helper/toolbar/configured_system/foreman/policy_mixin.rb b/app/helpers/application_helper/toolbar/configured_system/foreman/policy_mixin.rb deleted file mode 100644 index 278d75b464c..00000000000 --- a/app/helpers/application_helper/toolbar/configured_system/foreman/policy_mixin.rb +++ /dev/null @@ -1,23 +0,0 @@ -module ApplicationHelper::Toolbar::ConfiguredSystem::Foreman::PolicyMixin - def self.included(included_class) - included_class.button_group('provider_foreman_policy', [ - included_class.select( - :provider_foreman_policy_choice, - nil, - N_('Policy'), - :items => [ - included_class.button( - :configured_system_tag, - 'pficon pficon-edit fa-lg', - N_('Edit Tags for this Configured System'), - N_('Edit Tags'), - :url => "tagging", - :url_parms => "main_div", - :send_checked => true, - :enabled => false, - :onwhen => "1+"), - ] - ), - ]) - end -end diff --git a/app/helpers/application_helper/toolbar/unassigned_profiles_group_center.rb b/app/helpers/application_helper/toolbar/unassigned_profiles_group_center.rb deleted file mode 100644 index 01c72109650..00000000000 --- a/app/helpers/application_helper/toolbar/unassigned_profiles_group_center.rb +++ /dev/null @@ -1,4 +0,0 @@ -class ApplicationHelper::Toolbar::UnassignedProfilesGroupCenter < ApplicationHelper::Toolbar::Basic - include ApplicationHelper::Toolbar::ConfiguredSystem::Foreman::LifecycleMixin - include ApplicationHelper::Toolbar::ConfiguredSystem::Foreman::PolicyMixin -end diff --git a/app/helpers/application_helper/toolbar/x_foreman_configured_system_center.rb b/app/helpers/application_helper/toolbar/x_foreman_configured_system_center.rb deleted file mode 100644 index 4bfbbb5dad4..00000000000 --- a/app/helpers/application_helper/toolbar/x_foreman_configured_system_center.rb +++ /dev/null @@ -1,40 +0,0 @@ -class ApplicationHelper::Toolbar::XForemanConfiguredSystemCenter < ApplicationHelper::Toolbar::Basic - button_group('record_summary', [ - select( - :provider_foreman_lifecycle_choice, - nil, - t = N_('Lifecycle'), - t, - :enabled => true, - :items => [ - button( - :provider_foreman_configured_system_provision, - 'pficon pficon-add-circle-o fa-lg', - t = N_('Provision Configured System'), - t, - :url => "provision", - :url_parms => "main_div", - :send_checked => true, - :enabled => true), - ] - ), - select( - :provider_foreman_policy_choice, - nil, - t = N_('Policy'), - t, - :enabled => true, - :items => [ - button( - :configured_system_tag, - 'pficon pficon-edit fa-lg', - N_('Edit Tags for this Configured System'), - N_('Edit Tags'), - :url => "tagging", - :url_parms => "main_div", - :send_checked => true, - :enabled => true), - ] - ), - ]) -end diff --git a/app/helpers/application_helper/toolbar/x_provider_foreman_foreman_configured_system_center.rb b/app/helpers/application_helper/toolbar/x_provider_foreman_foreman_configured_system_center.rb deleted file mode 100644 index 9bde578ef66..00000000000 --- a/app/helpers/application_helper/toolbar/x_provider_foreman_foreman_configured_system_center.rb +++ /dev/null @@ -1,40 +0,0 @@ -class ApplicationHelper::Toolbar::XProviderForemanForemanConfiguredSystemCenter < ApplicationHelper::Toolbar::Basic - button_group('record_summary', [ - select( - :provider_foreman_lifecycle_choice, - nil, - t = N_('Lifecycle'), - t, - :enabled => true, - :items => [ - button( - :provider_foreman_configured_system_provision, - 'pficon pficon-add-circle-o fa-lg', - t = N_('Provision Configured System'), - t, - :url => "provision", - :url_parms => "main_div", - :send_checked => true, - :enabled => true), - ] - ), - select( - :provider_foreman_policy_choice, - nil, - t = N_('Policy'), - t, - :enabled => true, - :items => [ - button( - :configured_system_tag, - 'pficon pficon-edit fa-lg', - N_('Edit Tags for this Configured System'), - N_('Edit Tags'), - :url => "tagging", - :url_parms => "main_div", - :send_checked => true, - :enabled => true), - ] - ), - ]) -end diff --git a/app/helpers/application_helper/toolbar_chooser.rb b/app/helpers/application_helper/toolbar_chooser.rb index 8e0d463a745..c9d5ae0826a 100644 --- a/app/helpers/application_helper/toolbar_chooser.rb +++ b/app/helpers/application_helper/toolbar_chooser.rb @@ -17,8 +17,6 @@ def x_view_toolbar_filename nil elsif @layout == 'report' @report ? "report_view_tb" : nil - elsif @layout == 'provider_foreman' - @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 elsif @layout == 'automation_manager' @@ -90,8 +88,6 @@ 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) - center_toolbar_filename_configuration_manager_providers elsif @layout == "automation_manager" center_toolbar_filename_automation_manager elsif x_active_tree == :ae_tree @@ -530,16 +526,6 @@ def x_node_split x_node.split('-') end - def center_toolbar_filename_configuration_manager_providers - if x_active_tree == :configuration_manager_providers_tree - configuration_manager_providers_tree_center_tb(x_node_split) - elsif x_active_tree == :configuration_manager_cs_filter_tree - cs_filter_tree_center_tb(x_node_split) - elsif x_active_tree == :configuration_scripts_tree - configuration_scripts_tree_center_tb(x_node_split) - end - end - def center_toolbar_filename_automation_manager case x_active_tree when :automation_manager_providers_tree @@ -563,7 +549,6 @@ def configuration_manager_providers_tree_center_tb(nodes) when "cp" then "unassigned_profiles_group_center_tb" else "configuration_manager_providers_center_tb" end - else unassigned_configuration_profile_node(nodes) end end @@ -622,10 +607,6 @@ def inventory_group_center_tb end end - def unassigned_configuration_profile_node(nodes) - configuration_profile_center_tb if nodes[2] == "unassigned" - end - NO_GTL_VIEW_BUTTONS = %w[chargeback generic_object generic_object_definition @@ -636,7 +617,6 @@ def unassigned_configuration_profile_node(nodes) miq_policy miq_policy_rsop ops - provider_foreman pxe report].to_set.freeze diff --git a/app/helpers/provider_configuration_manager_helper.rb b/app/helpers/provider_configuration_manager_helper.rb deleted file mode 100644 index 0181756e392..00000000000 --- a/app/helpers/provider_configuration_manager_helper.rb +++ /dev/null @@ -1,41 +0,0 @@ -module ProviderConfigurationManagerHelper - include TextualMixins::TextualGroupTags - - def textual_group_properties - %i[hostname - ipmi_present - ipaddress - mac_address - provider_name - zone] - end - - def textual_hostname - {:label => _("Hostname"), - :icon => "ff ff-configured-system", - :value => @record.hostname, } - end - - def textual_ipmi_present - {:label => _("IPMI Present"), :value => @record.ipmi_present} - end - - def textual_ipaddress - {:label => _("IP Address"), :value => @record.ipaddress} - end - - def textual_mac_address - {:label => _("Mac address"), :value => @record.mac_address} - end - - def textual_provider_name - {:label => _("Provider"), - :image => @record.configuration_manager.decorate.fileicon, - :value => @record.configuration_manager.try(:name), - :explorer => true} - end - - def textual_zone - {:label => _("Zone"), :value => @record.configuration_manager.my_zone} - end -end diff --git a/app/helpers/provider_foreman_helper.rb b/app/helpers/provider_foreman_helper.rb deleted file mode 100644 index c5a3c3f7d79..00000000000 --- a/app/helpers/provider_foreman_helper.rb +++ /dev/null @@ -1,296 +0,0 @@ -module ProviderForemanHelper - include TextualMixins::TextualGroupTags - - def textual_group_properties - TextualGroup.new( - _("Properties"), - %i[hostname ipmi_present ipaddress mac_address configuration_profile_desc provider_name zone] - ) - end - - def textual_hostname - { - :label => _("Hostname"), - :icon => "ff ff-configured-system", - :value => @record.hostname, - } - end - - def textual_ipmi_present - {:label => _("IPMI Present"), :value => @record.ipmi_present} - end - - def textual_ipaddress - {:label => _("IP Address"), :value => @record.ipaddress} - end - - def textual_mac_address - {:label => _("Mac address"), :value => @record.mac_address} - end - - def textual_configuration_profile_desc - h = { - :label => _("Configuration Profile Description"), - :value => @record.configuration_profile.try(:description), - :explorer => true - } - h[:icon] = "fa fa-list-ul" if @record.configuration_profile - h - end - - def textual_provider_name - { - :label => _("Provider"), - :image => @record.configuration_manager.decorate.fileicon, - :value => @record.configuration_manager.try(:name), - :explorer => true - } - end - - def textual_zone - {:label => _("Zone"), :value => @record.configuration_manager.my_zone} - end - - def textual_group_environment - TextualGroup.new( - _("Environment"), - %i[configuration_environment_name configuration_domain_name configuration_realm_name] - ) - end - - def textual_configuration_environment_name - {:label => _("Environment"), :value => @record.configuration_profile.try(:configuration_environment_name)} - end - - def textual_configuration_domain_name - {:label => _("Domain"), :value => @record.configuration_profile.try(:configuration_domain_name)} - end - - def textual_configuration_realm_name - {:label => _("Realm"), :value => @record.configuration_profile.try(:configuration_realm_name)} - end - - def textual_group_os - TextualGroup.new( - _("Operating System"), - %i[ - configuration_compute_profile_name configuration_architecture_name operating_system_flavor_name - customization_script_medium_name customization_script_ptable_name - ] - ) - end - - def textual_configuration_compute_profile_name - {:label => _("Compute Profile"), :value => @record.configuration_profile.try(:configuration_compute_profile_name)} - end - - def textual_configuration_architecture_name - {:label => _("Architecture"), :value => @record.configuration_profile.try(:configuration_architecture_name)} - end - - def textual_operating_system_flavor_name - {:label => _("OS Information"), :value => @record.configuration_profile.try(:operating_system_flavor_name)} - end - - def textual_customization_script_medium_name - {:label => _("Medium"), :value => @record.configuration_profile.try(:customization_script_medium_name)} - end - - def textual_customization_script_ptable_name - {:label => _("Partition Table"), :value => @record.configuration_profile.try(:customization_script_ptable_name)} - end - - def textual_group_tenancy - TextualGroup.new(_("Tenancy"), %i[configuration_locations_name configuration_organizations_name]) - end - - def textual_configuration_locations_name - { - :label => _("Configuration Location"), - :value => (@record.configuration_profile.try(:configuration_locations) || []).collect(&:name).join(", ") - } - end - - def textual_configuration_organizations_name - { - :label => _("Configuration Organization"), - :value => (@record.configuration_profile.try(:configuration_organizations) || []).collect(&:name).join(", ") - } - end - - def textual_configuration_profile_group_properties - %i[configuration_profile_name - configuration_profile_region - configuration_profile_zone] - end - - def textual_configuration_profile_name - {:label => _("Name"), :value => @record.name} - end - - def textual_configuration_profile_region - {:label => _("Region"), :value => @record.region_description} - end - - def textual_configuration_profile_zone - {:label => _("Zone"), :value => @record.my_zone} - end - - def textual_configuration_profile_group_environment - %i[configuration_profile_environment - configuration_profile_domain - configuration_profile_puppet_realm] - end - - def textual_configuration_profile_environment - {:label => _("Environment"), :value => @record.configuration_environment_name} - end - - def textual_configuration_profile_domain - {:label => _("Domain"), :value => @record.configuration_domain_name} - end - - def textual_configuration_profile_puppet_realm - {:label => _("Puppet Realm"), :value => @record.configuration_realm_name} - end - - def textual_configuration_profile_group_os - %i[configuration_profile_compute_profile - configuration_profile_architecture - configuration_profile_os - configuration_profile_medium - configuration_profile_partition_table] - end - - def textual_configuration_profile_compute_profile - {:label => _("Compute Profile"), :value => @record.configuration_compute_profile_name} - end - - def textual_configuration_profile_architecture - {:label => _("Architecture"), :value => @record.configuration_architecture_name} - end - - def textual_configuration_profile_os - {:label => _("OS"), :value => @record.operating_system_flavor_name} - end - - def textual_configuration_profile_medium - {:label => _("Medium"), :value => @record.customization_script_medium_name} - end - - def textual_configuration_profile_partition_table - {:label => _("Partition Table"), :value => @record.customization_script_ptable_name} - end - - def textual_configuration_profile_group_tenancy - %i[configuration_profile_configuration_locations - configuration_profile_configuration_organizations] - end - - def textual_configuration_profile_configuration_locations - { - :label => _("Configuration Location"), - :value => @record.configuration_locations.collect(&:name).join(", ") - } - end - - def textual_configuration_profile_configuration_organizations - { - :label => _("Configuration Organization"), - :value => @record.configuration_organizations.collect(&:name).join(", ") - } - end - - def textual_inventory_group_properties - %i[inventory_group_name - inventory_group_region] - end - - def textual_inventory_group_name - {:label => _("Name"), :value => @record.name} - end - - def textual_inventory_group_region - {:label => _("Region"), :value => @record.region_description} - end - - def textual_inventory_group_architecture - {:label => _("Architecture"), :value => @record.configuration_architecture_name} - end - - def textual__inventory_group_oos - {:label => _("OS"), :value => @record.operating_system_flavor_name} - end - - def textual_inventory_group_medium - {:label => _("Medium"), :value => @record.customization_script_medium_name} - end - - def textual_inventory_group_partition_table - {:label => _("Partition Table"), :value => @record.customization_script_ptable_name} - end - - def textual_configuration_script_group_properties - %i[configuration_script_name - configuration_script_region] - end - - def textual_configuration_script_name - {:label => _("Name"), :value => @record.name} - end - - def textual_configuration_script_region - {:label => _("Region"), :value => @record.region_description} - end - - def textual_configuration_script_variables - textual_variables(@record.variables) - end - - def textual_configuration_script_survey - textual_survey_group(@record.survey_spec['spec']) - end - - def textual_configuration_script_group_os - %i[configuration_script_medium - configuration_script_partition_table] - end - - def textual_survey_group(items) - return unless items - h = {:title => _("Surveys"), - :headers => [_('Question Name'), _('Question Description'), _('Variable'), - _('Type'), _('Min'), _('Max'), _('Default'), _('Required'), _('Choices')], - :col_order => %w[question_name question_description variable type min max default required choices]} - h[:value] = items.collect do |item| - { - :title => item['index'], - :question_name => item['question_name'], - :question_description => item['question_description'], - :variable => item['variable'], - :type => item['type'], - :min => item['min'], - :max => item['max'], - :default => item['default'], - :required => item['required'], - :choices => item['choices'] - } - end - h - end - - def textual_variables(vars) - return unless vars - h = {:label => _("Variables"), - :headers => [_('Name'), _('Value')], - :col_order => %w[name value]} - h[:value] = vars.collect do |item| - { - :name => item[0].to_s, - :value => item[1].to_s - } - end - h - end -end -# diff --git a/app/presenters/menu/default_menu.rb b/app/presenters/menu/default_menu.rb index e4e64014d50..e8a9f639df9 100644 --- a/app/presenters/menu/default_menu.rb +++ b/app/presenters/menu/default_menu.rb @@ -13,7 +13,6 @@ def compute_menu_section def configuration_menu_section Menu::Section.new(:conf, N_("Configuration"), 'fa fa-cog', [ - Menu::Item.new('provider_foreman', N_('Management'), 'provider_foreman_explorer', {:feature => 'provider_foreman_explorer', :any => true}, '/provider_foreman/explorer'), 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'), diff --git a/app/presenters/tree_builder.rb b/app/presenters/tree_builder.rb index 6cbb019e46a..0094671e229 100644 --- a/app/presenters/tree_builder.rb +++ b/app/presenters/tree_builder.rb @@ -476,10 +476,8 @@ def prefixed_title(prefix, title) "e" => "ExtManagementSystem", "ev" => "MiqEventDefinition", "c" => "EmsCluster", - "csf" => "ManageIQ::Providers::Foreman::ConfigurationManager::ConfiguredSystem", "csa" => "ManageIQ::Providers::AnsibleTower::AutomationManager::ConfiguredSystem", "f" => "EmsFolder", - "fr" => "ManageIQ::Providers::Foreman::ConfigurationManager", "g" => "MiqGroup", "gd" => "GuestDevice", "god" => "GenericObjectDefinition", diff --git a/app/presenters/tree_builder_configuration_manager.rb b/app/presenters/tree_builder_configuration_manager.rb deleted file mode 100644 index f080b4db4d3..00000000000 --- a/app/presenters/tree_builder_configuration_manager.rb +++ /dev/null @@ -1,58 +0,0 @@ -class TreeBuilderConfigurationManager < TreeBuilder - has_kids_for ManageIQ::Providers::ConfigurationManager, [:x_get_tree_cmf_kids] - has_kids_for ConfigurationProfile, [:x_get_tree_cpf_kids] - - private - - def tree_init_options - {:lazy => true} - end - - def root_options - { - :text => t = _("All Configuration Manager Providers"), - :tooltip => t - } - end - - # Get root nodes count/array for explorer tree - def x_get_tree_roots - count_only_or_objects_filtered(false, ManageIQ::Providers::ConfigurationManager, "name") - end - - def node_by_tree_id(id) - # Creating empty record to show items under unassigned profiles group - super(id) || ConfigurationProfile.new - end - - def x_get_tree_cmf_kids(object, count_only) - assigned_configuration_profile_objs = - count_only_or_objects_filtered(count_only, - ConfigurationProfile.where(:manager_id => object[:id]), - "name") - unassigned_configuration_profile_objs = - fetch_unassigned_configuration_profile_objects(count_only, object[:id]) - - assigned_configuration_profile_objs + unassigned_configuration_profile_objs - end - - # Note: a lot of logic / queries to determine if should display menu item - def fetch_unassigned_configuration_profile_objects(count_only, configuration_manager_id) - unprovisioned_configured_systems = ConfiguredSystem.where(:configuration_profile_id => nil, - :manager_id => configuration_manager_id) - unprovisioned_configured_systems_filtered = Rbac.filtered(unprovisioned_configured_systems) - if unprovisioned_configured_systems_filtered.count > 0 - unassigned_id = "#{configuration_manager_id}-unassigned" - unassigned_configuration_profile = - [ConfigurationProfile.new(:name => "Unassigned Profiles Group|#{unassigned_id}", - :manager_id => configuration_manager_id)] - end - count_only_or_objects(count_only, unassigned_configuration_profile || []) - end - - def x_get_tree_cpf_kids(object, count_only) - configured_systems = ConfiguredSystem.where(:configuration_profile_id => object[:id], - :manager_id => object[:manager_id]) - count_only_or_objects_filtered(count_only, configured_systems, "hostname") - end -end diff --git a/app/presenters/tree_builder_configuration_manager_configured_systems.rb b/app/presenters/tree_builder_configuration_manager_configured_systems.rb deleted file mode 100644 index 57e75f4ea72..00000000000 --- a/app/presenters/tree_builder_configuration_manager_configured_systems.rb +++ /dev/null @@ -1,24 +0,0 @@ -class TreeBuilderConfigurationManagerConfiguredSystems < TreeBuilderConfiguredSystems - def initialize(*args) - @root_class = 'ConfiguredSystem' - super(*args) - end - - private - - def root_options - { - :text => t = _("All Configured Systems"), - :tooltip => t - } - end - - def configured_systems - { - :id => "csf", - :text => t = _("%{name} Configured Systems") % {:name => ui_lookup(:ui_title => 'foreman')}, - :icon => "pficon pficon-folder-close", - :tip => t - } - end -end diff --git a/app/presenters/tree_builder_configured_systems.rb b/app/presenters/tree_builder_configured_systems.rb deleted file mode 100644 index ad37b7100b9..00000000000 --- a/app/presenters/tree_builder_configured_systems.rb +++ /dev/null @@ -1,20 +0,0 @@ -class TreeBuilderConfiguredSystems < TreeBuilder - include TreeBuilderFiltersMixin - - private - - def tree_init_options - {:allow_reselect => true} - end - - def x_get_tree_custom_kids(object, count_only) - count_only_or_filter_kids(@root_class, object, count_only) - end - - # Get root nodes count/array for explorer tree - def x_get_tree_roots - objects = [] - objects.push(configured_systems) - count_only_or_objects(false, objects + FILTERS.values) - end -end diff --git a/app/presenters/tree_node/node.rb b/app/presenters/tree_node/node.rb index 87727796ad3..a61fb6dffe4 100644 --- a/app/presenters/tree_node/node.rb +++ b/app/presenters/tree_node/node.rb @@ -31,7 +31,6 @@ def key else base_class = @object.class.base_model.name # i.e. Vm or MiqTemplate base_class = "Datacenter" if base_class == "EmsFolder" && @object.kind_of?(::Datacenter) - base_class = "ManageIQ::Providers::Foreman::ConfigurationManager" if @object.kind_of?(ManageIQ::Providers::Foreman::ConfigurationManager) base_class = "ManageIQ::Providers::AnsibleTower::AutomationManager" if @object.kind_of?(ManageIQ::Providers::AnsibleTower::AutomationManager) prefix = TreeBuilder.get_prefix_for_model(base_class) cid = @object.id diff --git a/app/views/provider_foreman/_configscript_service_dialog.html.haml b/app/views/provider_foreman/_configscript_service_dialog.html.haml deleted file mode 100644 index 26693d8e130..00000000000 --- a/app/views/provider_foreman/_configscript_service_dialog.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -#form_div - #basic_info_div - = render :partial => "layouts/flash_msg" - - url = url_for_only_path(:action => "cs_form_field_changed", :id => @edit[:rec_id]) - .form-horizontal - .form-group - %label.col-md-2.control-label - = _('Service Dialog Name') - .col-md-8 - = text_field_tag("dialog_name", - "", - :autocomplete => 'off', - :diabled => false, - :class => "form-control", - :maxlength => 255, - "data-miq_observe" => {:interval => '.5', - :url => url}.to_json) diff --git a/app/views/provider_foreman/_configuration_profile.html.haml b/app/views/provider_foreman/_configuration_profile.html.haml deleted file mode 100644 index 1d9b5f80f09..00000000000 --- a/app/views/provider_foreman/_configuration_profile.html.haml +++ /dev/null @@ -1,18 +0,0 @@ -#configuration_profile_form_tabs - %ul.nav.nav-tabs - = miq_tab_header('summary', @sb[:active_tab]) do - = _("Summary") - = miq_tab_header('configured_systems', @sb[:active_tab]) do - = _("Configured Systems") - .tab-content - = miq_tab_content('configured_systems', @sb[:active_tab]) do - - if @sb[:active_tab] == "configured_systems" - = render :partial => "layouts/x_gtl" - :javascript - ManageIQ.afterOnload = "if (miqDomElementExists('adv_searchbox_div')) $('#adv_searchbox_div').show();" - = miq_tab_content('summary', @sb[:active_tab]) do - - if @sb[:active_tab] == "summary" - = render :partial => "main_configuration_profile" - -:javascript - miq_tabs_init('#configuration_profile_form_tabs', '/provider_foreman/change_tab'); diff --git a/app/views/provider_foreman/_configuration_script.html.haml b/app/views/provider_foreman/_configuration_script.html.haml deleted file mode 100644 index 1e2e8495ee2..00000000000 --- a/app/views/provider_foreman/_configuration_script.html.haml +++ /dev/null @@ -1,9 +0,0 @@ -= render :partial => "layouts/flash_msg" -.row - .col-md-12.col-lg-8 - = react 'GenericGroupWrapper', expand_generic_group(TextualGroup.new(_('Properties'), textual_configuration_script_group_properties), @record) - .col-md-12.col-lg-8 - = react 'TableListViewWrapper', TextualListview.data(textual_configuration_script_variables) - .col-md-12.col-lg-8 - - if @record.survey_spec['spec'] - = react 'TableListViewWrapper', TextualListview.data(textual_configuration_script_survey) diff --git a/app/views/provider_foreman/_form.html.haml b/app/views/provider_foreman/_form.html.haml deleted file mode 100644 index 0841f0eb0fb..00000000000 --- a/app/views/provider_foreman/_form.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -= render :partial => 'configuration_manager/shared_form' - -:javascript - ManageIQ.angular.app.value('configurationManagerFormId', '#{@provider_manager.id || "new"}'); - ManageIQ.angular.app.value('url', '/provider_foreman'); - ManageIQ.angular.app.value('modelName', 'providerForemanModel'); - miq_bootstrap('#form_div'); diff --git a/app/views/provider_foreman/_inventory_group.html.haml b/app/views/provider_foreman/_inventory_group.html.haml deleted file mode 100644 index 83c872f7c44..00000000000 --- a/app/views/provider_foreman/_inventory_group.html.haml +++ /dev/null @@ -1,18 +0,0 @@ -#inventory_group_form_tabs - %ul.nav.nav-tabs - = miq_tab_header('summary', @sb[:active_tab]) do - = _("Summary") - = miq_tab_header('configured_systems', @sb[:active_tab]) do - = _("Configured Systems") - .tab-content - = miq_tab_content('configured_systems', @sb[:active_tab]) do - - if @sb[:active_tab] == "configured_systems" - = render :partial => "layouts/x_gtl" - :javascript - ManageIQ.afterOnload = "if (miqDomElementExists('adv_searchbox_div')) $('#adv_searchbox_div').show();" - = miq_tab_content('summary', @sb[:active_tab]) do - - if @sb[:active_tab] == "summary" - = render :partial => "main_inventory_group" - -:javascript - miq_tabs_init('#inventory_group_form_tabs', '/provider_foreman/change_tab'); diff --git a/app/views/provider_foreman/_main_configuration_profile.html.haml b/app/views/provider_foreman/_main_configuration_profile.html.haml deleted file mode 100644 index cf142cc560d..00000000000 --- a/app/views/provider_foreman/_main_configuration_profile.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -= render :partial => "layouts/flash_msg" -.row - .col-md-12.col-lg-6 - = react 'GenericGroupWrapper', expand_generic_group(TextualGroup.new(_('Properties'), textual_configuration_profile_group_properties), @record) - = react 'GenericGroupWrapper', expand_generic_group(TextualGroup.new(_('Environment'), textual_configuration_profile_group_environment), @record) - = react 'GenericGroupWrapper', expand_generic_group(TextualGroup.new(_('Operating System'), textual_configuration_profile_group_os), @record) - .col-md-12.col-lg-6 - = react 'GenericGroupWrapper', expand_generic_group(TextualGroup.new(_('Tenancy'), textual_configuration_profile_group_tenancy), @record) diff --git a/app/views/provider_foreman/_main_inventory_group.html.haml b/app/views/provider_foreman/_main_inventory_group.html.haml deleted file mode 100644 index a30e4dd859b..00000000000 --- a/app/views/provider_foreman/_main_inventory_group.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -= render :partial => "layouts/flash_msg" -.row - .col-md-12.col-lg-6 - = react 'GenericGroupWrapper', expand_generic_group(TextualGroup.new(_('Properties'), textual_inventory_group_properties), @record) diff --git a/app/views/provider_foreman/explorer.html.haml b/app/views/provider_foreman/explorer.html.haml deleted file mode 100644 index 429d68ecb50..00000000000 --- a/app/views/provider_foreman/explorer.html.haml +++ /dev/null @@ -1,32 +0,0 @@ -- content_for :search do - = render(:partial => "layouts/x_adv_searchbox", :locals => {:nameonly => controller.provider_active_tree?}) - = render(:partial => 'layouts/quick_search') - -= render(:partial => 'shared/provider_paused', :locals => {:record => @record}) - --# These are the initial divs that will go inside center_cell_div -- if @configuration_profile_record - #main_div - - @pages = nil if @sb[:active_tab] == 'summary' - = render(:partial => 'provider_foreman/configuration_profile') -- elsif @inventory_group_record - #main_div - - @pages = nil if @sb[:active_tab] == 'summary' - = render(:partial => 'provider_foreman/inventory_group') - -- elsif @configured_system_record - #main_div - = render :partial => "layouts/textual_groups_generic" -- elsif @configuration_script_record - #main_div - = render(:partial => 'provider_foreman/configuration_script', :locals => {:controller => "provider_foreman"}) -- else - #main_div - - if ManageIQ::Providers::ConfigurationManager.none? && provider_active_tree? - = render :partial => 'layouts/empty', - :locals => {:add_message => _("Add a new Configuration Management Provider"), - :documentation => ::Settings.docs.configuration_provider} - - else - = render(:partial => 'layouts/x_gtl') - - diff --git a/app/views/provider_foreman/show.html.haml b/app/views/provider_foreman/show.html.haml deleted file mode 100644 index 1cbcf0e501d..00000000000 --- a/app/views/provider_foreman/show.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -= render(:partial => 'shared/provider_paused', :locals => {:record => @record}) - -#main_div - = render(:partial => 'layouts/x_gtl') diff --git a/product/views/ManageIQ_Providers_ConfigurationManager.yaml b/product/views/ManageIQ_Providers_ConfigurationManager.yaml index b48a21449dc..7919654548a 100644 --- a/product/views/ManageIQ_Providers_ConfigurationManager.yaml +++ b/product/views/ManageIQ_Providers_ConfigurationManager.yaml @@ -12,7 +12,7 @@ title: Providers # Menu name -name: ConfigurationManagerForeman +name: ConfigurationManager # Main DB table report is based on db: ManageIQ::Providers::ConfigurationManager diff --git a/product/views/ManageIQ_Providers_Foreman_ConfigurationManager.yaml b/product/views/ManageIQ_Providers_Foreman_ConfigurationManager.yaml deleted file mode 100644 index 2525a1e367f..00000000000 --- a/product/views/ManageIQ_Providers_Foreman_ConfigurationManager.yaml +++ /dev/null @@ -1,103 +0,0 @@ -# -# This is an MIQ Report configuration file -# Single value parameters are specified as: -# single_value_parm: value -# Multiple value parameters are specified as: -# multi_value_parm: -# - value 1 -# - value 2 -# - -# Report title -title: Providers - -# Menu name -name: ConfigurationManagerForeman - -# Main DB table report is based on -db: ManageIQ::Providers::Foreman::ConfigurationManager - -# Columns to fetch from the main table -cols: -- name -- url -- type -- last_refresh_date -- region_description -- authentication_status -- total_configuration_profiles -- total_configured_systems - -# Included tables (joined, has_one, has_many) and columns -include: - zone: - columns: - - name - endpoints: - columns: - - url - -# Included tables and columns for query performance -include_for_find: - -# Order of columns (from all tables) -col_order: -- name -- url -- type -- zone.name -- last_refresh_date -- region_description -- authentication_status -- total_configuration_profiles -- total_configured_systems - -# Column titles, in order -headers: -- Provider Name -- URL -- Type -- Zone -- Last Refresh Date -- Region Description -- Status -- Total Configuration Profiles -- Total Configured Systems - -col_formats: -- -- -- :model_name -- -- -- - -# Condition(s) string for the SQL query -conditions: - -# Order string for the SQL query -order: Ascending - -# Columns to sort the report on, in order -sortby: -- name - -# Group rows (y=yes,n=no,c=count) -group: n - -# Graph type -# Bar -# Column -# ColumnThreed -# ParallelThreedColumn -# Pie -# PieThreed -# StackedBar -# StackedColumn -# StackedThreedColumn - -graph: - -# Dimensions of graph (1 or 2) -# Note: specifying 2 for a single dimension graph may not return expected results -dims: diff --git a/product/views/ManageIQ_Providers_Foreman_ConfigurationManager_ConfigurationProfile.yaml b/product/views/ManageIQ_Providers_Foreman_ConfigurationManager_ConfigurationProfile.yaml deleted file mode 100644 index 498cc1af6e1..00000000000 --- a/product/views/ManageIQ_Providers_Foreman_ConfigurationManager_ConfigurationProfile.yaml +++ /dev/null @@ -1,83 +0,0 @@ -# -# This is an MIQ Report configuration file -# Single value parameters are specified as: -# single_value_parm: value -# Multiple value parameters are specified as: -# multi_value_parm: -# - value 1 -# - value 2 -# - -# Report title -title: ConfigurationProfile - -# Menu name -name: ConfigurationProfile - -# Main DB table report is based on -db: ManageIQ::Providers::Foreman::ConfigurationManager::ConfigurationProfile - -# Columns to fetch from the main table -cols: -- description -- total_configured_systems -- configuration_environment_name -- my_zone -- region_description - -# Included tables (joined, has_one, has_many) and columns - -# Included tables and columns for query performance - -# Order of columns (from all tables) -col_order: -- description -- total_configured_systems -- configuration_environment_name -- my_zone -- region_description - -# Column titles, in order -headers: -- Description -- Total Configured Systems -- Environment -- Zone -- Region - -col_formats: -- -- -- -- -- - -# Condition(s) string for the SQL query -conditions: - -# Order string for the SQL query -order: Ascending - -# Columns to sort the report on, in order -sortby: -- description - -# Group rows (y=yes,n=no,c=count) -group: n - -# Graph type -# Bar -# Column -# ColumnThreed -# ParallelThreedColumn -# Pie -# PieThreed -# StackedBar -# StackedColumn -# StackedThreedColumn - -graph: - -# Dimensions of graph (1 or 2) -# Note: specifying 2 for a single dimension graph may not return expected results -dims: diff --git a/product/views/ManageIQ_Providers_Foreman_ConfigurationManager_ConfiguredSystem.yaml b/product/views/ManageIQ_Providers_Foreman_ConfigurationManager_ConfiguredSystem.yaml deleted file mode 100644 index 7c20aefadef..00000000000 --- a/product/views/ManageIQ_Providers_Foreman_ConfigurationManager_ConfiguredSystem.yaml +++ /dev/null @@ -1,88 +0,0 @@ -# -# This is an MIQ Report configuration file -# Single value parameters are specified as: -# single_value_parm: value -# Multiple value parameters are specified as: -# multi_value_parm: -# - value 1 -# - value 2 -# - -# Report title -title: ConfiguredSystem - -# Menu name -name: ConfiguredSystems - -# Main DB table report is based on -db: ManageIQ::Providers::Foreman::ConfigurationManager::ConfiguredSystem - -# Columns to fetch from the main table -cols: -- hostname -- type -- last_checkin -- build_state -- my_zone -- configuration_environment_name -- configuration_profile_name - -# Included tables (joined, has_one, has_many) and columns -include: - -# Order of columns (from all tables) -col_order: -- hostname -- type -- last_checkin -- build_state -- my_zone -- configuration_environment_name -- configuration_profile_name - -# Column titles, in order -headers: -- Hostname -- Type -- Last Checkin -- Build State -- Zone -- Environment -- Configuration Profile - -col_formats: -- -- :model_name -- -- -- - -# Condition(s) string for the SQL query -conditions: - -# Order string for the SQL query -order: Ascending - -# Columns to sort the report on, in order -sortby: -- hostname - -# Group rows (y=yes,n=no,c=count) -group: n - -# Graph type -# Bar -# Column -# ColumnThreed -# ParallelThreedColumn -# Pie -# PieThreed -# StackedBar -# StackedColumn -# StackedThreedColumn - -graph: - -# Dimensions of graph (1 or 2) -# Note: specifying 2 for a single dimension graph may not return expected results -dims: