Don't fail if graphite stats found for unconfigured pools

This commit is contained in:
Scott Schneider 2013-12-20 11:41:44 -08:00
parent e3080a432d
commit 36cc7ea3fe

View file

@ -68,6 +68,8 @@ get '/dashboard/stats/vcloud/pool' do
history.each do |pool|
if pool['target'] =~ /.*\.(.*)$/
pool['name'] = $1
if ( result[pool['name']] )
pool['last'] = result[pool['name']]['size']
result[pool['name']]['history'] ||= Array.new
@ -83,6 +85,7 @@ get '/dashboard/stats/vcloud/pool' do
end
end
end
end
else
config[:pools].each do |pool|
result[pool['name']] ||= Hash.new