Rank by operational sites; show what each status check probes
The datacenter text said "No. 33 by power" for a site that is 25th on the default card, because it counted construction projects. Rank among operational datacenters only, matching the card, and leave the rank out for sites not yet in service. data.json and status.json gain an operational_rank next to the list position. The status page now lists, under each site, the hosts it probes with their label, last result and the source that ties them to the site, folded away behind a click; the control hosts in Russia get the same list, and datacenter pages show it under their reachability block. status.json carries the same targets. For search: a keyword title tagline and meta description, WebPage and Dataset structured data (pointing at status.json), x-default, and the status pages in the sitemap. Assisted-by: Claude:opus-5-5
This commit is contained in:
parent
7fb11211d7
commit
5e36cc6a95
8 changed files with 118 additions and 28 deletions
13
views/_probes.erb
Normal file
13
views/_probes.erb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<details class="probes">
|
||||
<summary><%= title %> (<%= probes.size %>)</summary>
|
||||
<ul>
|
||||
<% probes.each do |p| %>
|
||||
<li>
|
||||
<span class="st <%= { true => 'up', false => 'down', nil => 'unknown' }[p[:last_ok]] %>"></span>
|
||||
<code><%= p[:host] %>:<%= p[:port] %></code><% if p[:label] %> — <%= p[:label] %><% end %>
|
||||
<% if p[:last_ok] %> · <%= p[:last_rtt_ms] %> <%= t(:status_cols)['rtt'] %><% elsif p[:last_ok] == false %> · <%= t(:status_no_answer) %><% end %>
|
||||
<% if p[:source_url] %> · <a href="<%= p[:source_url] %>" target="_blank" rel="nofollow noopener"><%= t(:status_source) %></a><% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</details>
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
<h2><%= t(:status_dc) %></h2>
|
||||
<p><span class="st <%= @status.state %>"><%= t(:status_states)[@status.state] %></span> · <a href="/<%= @locale %>/status"><%= t(:status_link) %></a></p>
|
||||
<%== erb :_status_bars, layout: false, locals: { history: @status.history } %>
|
||||
<%== erb :_probes, layout: false, locals: { probes: @status.targets, title: t(:status_probes) } %>
|
||||
</section>
|
||||
<% end %>
|
||||
<section>
|
||||
|
|
@ -29,8 +30,8 @@
|
|||
</article>
|
||||
|
||||
<nav class="pager">
|
||||
<% if @prev %><a href="<%= dc_path(@prev) %>" rel="prev">← #<%= @prev.position %> <%= @prev.l(:name, @locale) %></a><% else %><span></span><% end %>
|
||||
<% if @next %><a href="<%= dc_path(@next) %>" rel="next">#<%= @next.position %> <%= @next.l(:name, @locale) %> →</a><% end %>
|
||||
<% if @prev %><a href="<%= dc_path(@prev) %>" rel="prev">← <%= "##{op_rank(@prev)} " if op_rank(@prev) %><%= @prev.l(:name, @locale) %></a><% else %><span></span><% end %>
|
||||
<% if @next %><a href="<%= dc_path(@next) %>" rel="next"><%= "##{op_rank(@next)} " if op_rank(@next) %><%= @next.l(:name, @locale) %> →</a><% end %>
|
||||
</nav>
|
||||
<p><a href="/<%= @locale %>"><%= t(:back) %></a></p>
|
||||
|
||||
|
|
|
|||
|
|
@ -168,6 +168,13 @@
|
|||
.bars i.down { background: var(--hit); }
|
||||
.status-banner { padding: 10px 14px; border-radius: 8px; background: var(--hit-bg); margin: 0 0 16px; max-width: 65ch; }
|
||||
.unmonitored { color: var(--muted); font-size: 13px; max-width: 75ch; }
|
||||
.probes { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
|
||||
.probes summary { cursor: pointer; width: max-content; }
|
||||
.probes ul { list-style: none; margin: 6px 0 0; padding: 0; }
|
||||
.probes li { margin: 2px 0; overflow-wrap: anywhere; }
|
||||
.probes code { color: var(--ink); }
|
||||
.status-table .probe-row td { border-top: 0; padding-top: 0; }
|
||||
.status-table tr:has(+ .probe-row) td { border-bottom: 0; padding-bottom: 2px; }
|
||||
footer { margin-top: 32px; color: var(--muted); font-size: 13px; }
|
||||
footer p { margin: 0 0 4px; }
|
||||
@media (max-width: 560px) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<% r = @report %>
|
||||
<main>
|
||||
<header>
|
||||
<h1><%= t(:status_h1) %> <span><%= t(:status_accent) %></span></h1>
|
||||
<h1><%= t(:status_h1) %> <span><%= t(:status_accent) %></span> <small><%= t(:status_tagline) %></small></h1>
|
||||
<nav class="langs">
|
||||
<% Bingo::LOCALES.each do |l| %>
|
||||
<a href="<%= @path_for.(l) %>" hreflang="<%= l %>" lang="<%= l %>" <%== 'aria-current="page"' if l == @locale %>><%= l %></a>
|
||||
|
|
@ -24,25 +24,25 @@
|
|||
<% c = r.counts %>
|
||||
<% %w[up degraded down unknown].each do |s| %><% if c[s] %> <span class="st <%= s %>"><%= t(:status_states)[s] %>: <%= c[s] %></span><% end %><% end %>
|
||||
</p>
|
||||
<% if r.control_hosts.any? %><%== erb :_probes, layout: false, locals: { probes: r.control_hosts, title: t(:status_controls_list) } %><% end %>
|
||||
|
||||
<table class="status-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th><th><%= t(:status_cols)['dc'] %></th><th><%= t(:status_cols)['state'] %></th>
|
||||
<th><%= t(:status_cols)['hours'] %></th><th class="num hide-sm"><%= t(:status_cols)['rtt'] %></th>
|
||||
<th class="num hide-sm"><%= t(:status_cols)['targets'] %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% r.sites.each do |s| %>
|
||||
<tr>
|
||||
<td class="num"><%= s.dc.position %></td>
|
||||
<td class="num"><%= op_rank(s.dc) %></td>
|
||||
<td><a href="<%= dc_path(s.dc) %>"><%= s.dc.l(:name, @locale) %></a><span class="city"><%= s.dc.l(:city, @locale) %> · <%= s.dc.operator %></span></td>
|
||||
<td><span class="st <%= s.state %>"><%= t(:status_states)[s.state] %></span></td>
|
||||
<td><%== erb :_status_bars, layout: false, locals: { history: s.history } %></td>
|
||||
<td class="num hide-sm"><%= s.rtt_ms %></td>
|
||||
<td class="num hide-sm"><%= s.targets %></td>
|
||||
</tr>
|
||||
<tr class="probe-row"><td></td><td colspan="4"><%== erb :_probes, layout: false, locals: { probes: s.targets, title: t(:status_probes) } %></td></tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue