Project

General

Profile

« Previous | Next » 

Revision fdc22cbd

Added by Ohad Levy about 14 years ago

  • ID fdc22cbd149adba6a0ee7934abfc521a38182c63

fixes #180 - Query to return more information

View differences:

app/controllers/hosts_controller.rb
end
def query
if @verbose
@hosts.map! do |host|
hash = {}
h = Host.find_by_name host
hash[host] = h.info
facts = {}
h.fact_values.each {|fv| facts[fv.fact_name.name] = fv.value}
hash[host]["facts"]= facts
hash
end
end
respond_to do |format|
format.html
format.yml { render :text => @hosts.to_yaml }
......
@hosts = []
counter = 0
@verbose = params[:verbose] == "yes"
case params[:state]
when "out_of_sync"
state = "out_of_sync"

Also available in: Unified diff