lib/elasticsearch/extensions/test/cluster.rb in elasticsearch-extensions-0.0.16 vs lib/elasticsearch/extensions/test/cluster.rb in elasticsearch-extensions-0.0.17

- old
+ new

@@ -253,12 +253,16 @@ 'Cluster: '.ljust(20).ansi(:faint) + health['cluster_name'].to_s.ansi(:faint), 'Status: '.ljust(20).ansi(:faint) + health['status'].to_s.ansi(:faint), 'Nodes: '.ljust(20).ansi(:faint) + health['number_of_nodes'].to_s.ansi(:faint) nodes['nodes'].each do |id, info| - m = id == master ? '+' : '-' + m = id == master ? '*' : '+' puts ''.ljust(20) + - "#{m} #{info['name'].ansi(:bold)} | version: #{info['version']}, pid: #{info['process']['id']}, address: #{info['http']['bound_address']}".ansi(:faint) + "#{m} ".ansi(:faint) + + "#{info['name'].ansi(:bold)} ".ansi(:faint) + + "| version: #{info['version'] rescue 'N/A'}, ".ansi(:faint) + + "pid: #{info['process']['id'] rescue 'N/A'}, ".ansi(:faint) + + "address: #{info['http']['bound_address'] rescue 'N/A'}".ansi(:faint) end end # Tries to load cluster health information #