summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-06-15 20:17:51 +0200
committerDaniel Friesel <derf@finalrewind.org>2017-06-15 20:17:51 +0200
commitac05cd28d02947bb99ff02dd680a2d0e6b848c67 (patch)
treea23a465242921e131ccddd1da3a58e1958dcefc1 /templates
parent061d6b06cb4f6a784ed17469608bd9dad94c0b6b (diff)
Add a memory column to the host overview
Diffstat (limited to 'templates')
-rw-r--r--templates/main.html.ep7
1 files changed, 7 insertions, 0 deletions
diff --git a/templates/main.html.ep b/templates/main.html.ep
index 6f786dc..d23644c 100644
--- a/templates/main.html.ep
+++ b/templates/main.html.ep
@@ -4,12 +4,19 @@
<tr>
<th>Hostname</th>
<th>Load</th>
+ <th>Memory</th>
<th>OS</th>
</tr>
% for my $host (@{$active_hosts}) {
<tr>
<td><%= $host->{hostname} %></td>
<td><%= $host->{load15} %></td>
+ % if (exists $host->{mem_used_ratio}) {
+ <td><%= sprintf('%.1f%%', $host->{mem_used_ratio} * 100) %></td>
+ % }
+ % else {
+ <td><%= sprintf('%d MB', $host->{mem_total} / 1024) %></td>
+ % }
<td>Debian <%= $host->{debian_version} %></td>
</tr>
% }