ha-handler/lib/ha_handler/web/templates/index.html.eex

125 lines
2.9 KiB
Elixir

<!DOCTYPE html>
<html>
<head>
<title>[HA] <%= hostname %></title>
<link rel="stylesheet" href="/static/app.css">
</head>
<body>
<main>
<div>
<img id="logo" src="/static/logo.svg" />
</div>
<h1>Recycled Cloud HA handler</h1>
<p>
This service supervises the various components of
the Recycled Cloud's High Availability
infrastruture. Documentation and source code can be
found on <a
href="https://code.recycled.cloud/RecycledCloud/ha-handler">our
software forge</a>.
</p>
<hr />
<h2>Handler</h2>
<%= otp_app %> <b>v<%= version %></b> (<%= env %>) running on <b><%= hostname %></b>
<hr />
<h2>HAProxy</h2>
<h3>Frontends</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Status</th>
<th>Bytes in</th>
<th>Bytes out</th>
</tr>
</thead>
<tbody>
<%= for entry <- Map.get(haproxy_stats, "Frontend") do %>
<tr>
<td><%= entry["pxname"] %></td>
<td><%= entry["status"] %></td>
<td><%= entry["bin"] %></td>
<td><%= entry["bout"] %></td>
</tr>
<% end %>
</tbody>
</table>
<h3>Backends</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Status</th>
<th>algo</th>
</tr>
</thead>
<tbody>
<%= for entry <- Map.get(haproxy_stats, "Backend") do %>
<tr>
<td><%= entry["pxname"] %></td>
<td><%= entry["status"] %></td>
<td><%= entry["algo"] %></td>
</tr>
<% end %>
</tbody>
</table>
<h3>Servers</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Status</th>
<th>Mode</th>
<th>Address</th>
</tr>
</thead>
<tbody>
<%= for entry <- Map.get(haproxy_stats, "Server") do %>
<tr>
<td><%= entry["pxname"] %>/<%= entry["svname"] %></td>
<td><%= entry["status"] %></td>
<td><%= entry["mode"] %></td>
<td><%= entry["addr"] %></td>
</tr>
<% end %>
</tbody>
</table>
<hr />
<h2>PostgreSQL</h2>
<table>
<thead>
<tr>
<th>Hostname</th>
<th>Version</th>
<th>Status</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<%= for entry <- pgsql_status do %>
<tr>
<td><%= entry[:hostname] %></td>
<td><%= entry[:version] %></td>
<td><%= entry[:status] %></td>
<td><%= entry[:mode] %></td>
</tr>
<% end %>
</tbody>
</table>
</main>
</body>
</html>