Class: ForemanMco::CommandHistoriesController

Inherits:
ApplicationController
  • Object
show all
Includes:
Foreman::Controller::AutoCompleteSearch, Foreman::Controller::TaxonomyMultiple
Defined in:
app/controllers/foreman_mco/command_histories_controller.rb

Constant Summary collapse

SEARCHABLE_ACTIONS =
%w[index]

Instance Method Summary collapse

Instance Method Details

#detailedObject



18
19
20
# File 'app/controllers/foreman_mco/command_histories_controller.rb', line 18

def detailed
  @details = HostCommandStatus.where(:command_status_id => params[:id])
end

#indexObject



8
9
10
11
12
13
14
15
16
# File 'app/controllers/foreman_mco/command_histories_controller.rb', line 8

def index
  begin
    search = CommandStatus.search_for(params[:search],:order => params[:order])
  rescue => e
    error e.to_s
    search = CommandStatus.search_for ''
  end
  @command_statuses = search.paginate(:page => params[:page])
end

#model_of_controllerObject



22
23
24
# File 'app/controllers/foreman_mco/command_histories_controller.rb', line 22

def model_of_controller
  CommandStatus
end