Class: ForemanPuppet::PuppetSmartProxiesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/foreman_puppet/puppet_smart_proxies_controller.rb

Instance Method Summary collapse

Instance Method Details

#dashboardObject



12
13
14
15
16
17
# File 'app/controllers/foreman_puppet/puppet_smart_proxies_controller.rb', line 12

def dashboard
  @data = Dashboard::Data.new("puppet_proxy_id = \"#{@smart_proxy.id}\"")
  render partial: 'foreman_puppet/puppet_smart_proxies/dashboard'
rescue Foreman::Exception => e
  process_ajax_error e
end

#environmentsObject



6
7
8
9
10
# File 'app/controllers/foreman_puppet/puppet_smart_proxies_controller.rb', line 6

def environments
  render partial: 'foreman_puppet/puppet_smart_proxies/environments', locals: { environments: @proxy_status[:puppet].environment_stats }
rescue Foreman::Exception => e
  process_ajax_error e
end

#resource_classObject



19
20
21
# File 'app/controllers/foreman_puppet/puppet_smart_proxies_controller.rb', line 19

def resource_class
  ::SmartProxy
end