Class: ForemanHosts::HostsController

Inherits:
HostsController
  • Object
show all
Defined in:
app/controllers/foreman_hosts/hosts_controller.rb

Overview

Example: Plugin’s HostsController inherits from Foreman’s HostsController

Instance Method Summary collapse

Instance Method Details

#report_indexObject

change layout if needed layout ‘foreman_hosts/layouts/new_layout’



7
8
9
10
11
12
13
14
15
# File 'app/controllers/foreman_hosts/hosts_controller.rb', line 7

def report_index
  @fact_values = FactValue.all
  @fact_names = FactName.all
  @hosts = Host.all
  respond_to do |format|
    format.html # index.html.erb
    format.json { render json: @hosts }
  end
end