Module: ForemanHostRundeck::HostsControllerExtensions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/concerns/foreman_host_rundeck/hosts_controller_extensions.rb
Instance Method Summary collapse
Instance Method Details
#index_with_rundeck(title = nil) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/concerns/foreman_host_rundeck/hosts_controller_extensions.rb', line 10 def index_with_rundeck(title = nil) if params[:format] == 'yaml' result = {} hosts = resource_base.search_for(params[:search], :order => params[:order]).includes(included_associations) hosts.each { |h| result.update(RundeckFormatter.new(h).output) } render :text => result.to_yaml else index_without_rundeck(title) end end |
#show_with_rundeck ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/controllers/concerns/foreman_host_rundeck/hosts_controller_extensions.rb', line 21 def show_with_rundeck if params[:format] == 'yaml' render :text => RundeckFormatter.new(@host, params[:add_enc_output]).output.to_yaml else show_without_rundeck end end |