summaryrefslogtreecommitdiff
path: root/templates/main.html.ep
blob: d23644c5d890e7427eeb0163de9f09e9beb72b72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<div>
	<h1> Active </h1>
	<table>
		<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>
		% }
	</table>
	<h1> Old </h1>
	<table>
		<tr>
			<th>Hostname</th>
			<th>Load</th>
			<th>OS</th>
		</tr>
		% for my $host (@{$old_hosts}) {
			<tr>
				<td><%= $host->{hostname} %></td>
				<td><%= $host->{load15} %></td>
				<td>Debian <%= $host->{debian_version} %></td>
			</tr>
		% }
	</table>
</div>