Class: AboutController

Inherits:
ApplicationController show all
Defined in:
app/controllers/about_controller.rb

Instance Attribute Summary

Attributes inherited from ApplicationController

#original_search_parameter

Instance Method Summary collapse

Methods inherited from ApplicationController

#api_request?, #current_user, parameter_filter_context, #resource_path, #welcome

Methods included from ApplicationShared

#current_permission, #find_default_taxonomy, #find_session_taxonomy, #set_current_taxonomy, #set_current_user, #set_taxonomy, #store_default_taxonomy, #store_taxonomy

Methods included from FindCommon

#controller_permission, #find_resource, #resource_class, #resource_class_for, #resource_finder, #resource_name, #resource_scope, #scope_for

Methods included from Foreman::ThreadSession::Cleaner

#clear_thread

Methods included from Foreman::Controller::Timezone

#set_timezone

Methods included from Foreman::Controller::TopbarSweeper

#set_topbar_sweeper_controller

Methods included from Foreman::Controller::Session

#backup_session_content, #expire_session, #ignore_api_request?, #session_expiry, #set_activity_time, #update_activity_time

Methods included from Foreman::Controller::Authentication

#authenticate, #authorized, #available_sso, #check_user_enabled, #is_admin?, #path_to_authenticate, #require_login

Methods included from Foreman::Controller::MigrationChecker

needs_migration?

Instance Method Details

#indexObject


4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/about_controller.rb', line 4

def index
  @smart_proxies = SmartProxy.authorized(:view_smart_proxies).includes(:features)
  @compute_resources = ComputeResource.authorized(:view_compute_resources)
  @plugins = Foreman::Plugin.all

  enabled_providers = ComputeResource.providers.keys
  @providers = ComputeResource.all_providers.map do |provider_name, provider_class|
    {
      :friendly_name => provider_class.constantize.provider_friendly_name,
      :name => provider_name,
      :status => enabled_providers.include?(provider_name) ? :installed : :absent,
    }
  end
end