/status: add more information to /status page.

Add the following:

* Container name, machine name, worker id.
* Container uptime, puma uptime, worker uptime.
* Number of requests processed by current worker.
* ExifTool version.

Also change /status page to show information in tables instead of lists.
This commit is contained in:
evazion
2021-09-26 22:52:28 -05:00
parent 52bf4a3a6b
commit f8d52e6758
4 changed files with 95 additions and 19 deletions

View File

@@ -1,7 +1,9 @@
<%# hash %>
<dl>
<table class="striped aligned-vertical">
<% hash.each do |key, value| %>
<dt><%= key.to_s.humanize %></dt>
<dd><%= value %></dd>
<tr>
<th><%= key.to_s.humanize %></th>
<td><%= value %></td>
</tr>
<% end %>
</dl>
</table>

View File

@@ -2,17 +2,27 @@
<div id="a-show" class="fixed-width-container">
<h1>Status</h1>
<% if @status.danbooru_version.present? && Danbooru.config.source_code_url.present? %>
<p>Running <%= external_link_to "#{Danbooru.config.source_code_url}/commits/#{@status.danbooru_version}", @status.danbooru_version.first(7) %>.</p>
<% end %>
<h2>Server</h2>
<h2>Instance</h1>
<details>
<summary>
Server: <%= @status.hostname %>
Running
<% if @status.danbooru_version.present? && Danbooru.config.source_code_url.present? %>
<%= external_link_to "#{Danbooru.config.source_code_url}/commits/#{@status.danbooru_version}", @status.danbooru_version.first(7) %>
<% end %>
on <%= @status.instance_name %>
for <%= @status.instance_uptime %>
</summary>
<%= render "list", hash: @status.serializable_hash[:status] %>
<%= render "list", hash: @status.serializable_hash[:instance] %>
</details>
<h2>Server</h1>
<details>
<summary>
Server: <%= @status.node_name %>
</summary>
<%= render "list", hash: @status.serializable_hash[:server] %>
</details>
<h2>Postgres</h2>