.ui.active.segment %h4.ui.header .content Stats %table.ui.compact.table %thead %tr - stats.first.keys.each do |key| %th= key.titleize %tbody - stats.each do |row| %tr - row.each do |k,v| - if ['total_received', 'total_sent', 'avg_recv', 'avg_sent'].include? k %td= number_to_human_size(v) - elsif ['total_query_time', 'avg_query'].include? k %td= humanize_ms(v.to_i) - else %td= v