Node status

<% active_nodes = 0 %>
<% nodes.sort_by { |n| n.hostname || "" }.each do |n| %> <% if n.crunch_worker_state.in? ["busy", "idle"] and (Time.now - n[:last_ping_at]) < 3600 %> <% active_nodes += 1 %>
<%= n.hostname %>
state: <%= n.crunch_worker_state %>
<% [:total_cpu_cores, :total_ram_mb, :total_scratch_mb].each do |i| %> <%= i.to_s.gsub '_', ' ' %>: <%= n.properties[i] %>
<% end %>
<% end %> <% end %> <% if active_nodes == 0 %> No active nodes <% end %>