Project

General

Profile

Feature #226 » dashboard_oos_yaml.patch

Bash Shell, 04/28/2010 11:32 PM

View differences:

app/controllers/dashboard_controller.rb
end
def OutOfSync
hosts = Host.out_of_sync.paginate(:page => params[:page], :order => 'last_report DESC')
render :partial => "hosts/minilist", :layout => true, :locals => {
:hosts => hosts,
:header => "Hosts which didnt run puppet in the last #{SETTINGS[:puppet_interval]} minutes" }
respond_to do |format|
format.html {
hosts = Host.out_of_sync.paginate(:page => params[:page], :order => 'last_report DESC')
render :partial => "hosts/minilist", :layout => true, :locals => {
:hosts => hosts,
:header => "Hosts which didnt run puppet in the last #{SETTINGS[:puppet_interval]} minutes" }
}
oos_list = Host.out_of_sync.each {|host| host.name<<"\n"}
format.yml { render :text => oos_list }
end
end
private
(1-1/2)