<% r = @report %>

<%= t(:status_h1) %> <%= t(:status_accent) %> <%= t(:status_tagline) %>

<%= t(:status_lead) %>

<%= t(:status_note) %>

<% if r.nil? || r.checked_at.nil? %>

<%= t(:status_never) %>

<% else %> <% if r.state == 'stale' %>

<%= t(:status_stale) %>

<% end %> <% if r.state == 'vantage' %>

<%= t(:status_vantage) %>

<% end %>

<%= format(t(:status_checked), time: r.checked_at.strftime('%d.%m.%Y %H:%M')) %> <% if r.controls && r.controls[1].positive? %><%= format(t(:status_controls), ok: r.controls[0], n: r.controls[1]) %><% end %> <% c = r.counts %> <% %w[up degraded down unknown].each do |s| %><% if c[s] %> <%= t(:status_states)[s] %>: <%= c[s] %><% end %><% end %>

<% if r.control_hosts.any? %><%== erb :_probes, layout: false, locals: { probes: r.control_hosts, title: t(:status_controls_list) } %><% end %> <% r.sites.each do |s| %> <% end %>
#<%= t(:status_cols)['dc'] %><%= t(:status_cols)['state'] %> <%= t(:status_cols)['hours'] %><%= t(:status_cols)['rtt'] %>
<%= op_rank(s.dc) %> <%= s.dc.l(:name, @locale) %><%= s.dc.l(:city, @locale) %> ยท <%= s.dc.operator %> <%= t(:status_states)[s.state] %> <%== erb :_status_bars, layout: false, locals: { history: s.history } %> <%= s.rtt_ms %>
<%== erb :_probes, layout: false, locals: { probes: s.targets, title: t(:status_probes) } %>
<% end %> <% if r && r.unmonitored.any? %>

<%= t(:status_unmonitored) %> (<%= r.unmonitored.size %>)

<%= t(:status_unmonitored_note) %>

<% r.unmonitored.each_with_index do |dc, i| %><%= ', ' if i.positive? %><%= dc.l(:name, @locale) %><% end %>

<% end %> <%== erb :_footer, layout: false %>