summaryrefslogtreecommitdiffstats
path: root/health-storage-html.lsp
blob: 15830c31159d8e5a135a77b59a7f8f5f81bb7417 (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
40
41
42
43
44
45
46
47
<? local view = ... ?>

<h1>General health</h1>

<h2>Storage</h2>

<h3>Floppy capacity</h3>
<pre><?= view.storage.floppycapacity.value ?></pre>

<? if (view.storage.floppycapacity.used) then ?>
<TABLE STYLE="margin:0px;padding:0px;border:0px">
	<TR>
		<TD>0%</TD><TD WIDTH="<?= view.storage.floppycapacity.used ?>%" STYLE="background:red;"><CENTER><? if ( tonumber(view.storage.floppycapacity.used) > 10) then io.write(view.storage.floppycapacity.used .. "%") end ?></CENTER></TD><TD WIDTH="<?= (100-view.storage.floppycapacity.used) ?>%" STYLE="background:green;"><CENTER><? if ( 90 > tonumber(view.storage.floppycapacity.used)) then io.write((100-view.storage.floppycapacity.used) .. "%") end ?></CENTER></TD><TD>100%</TD>
	</TR>
</TABLE>
<TABLE STYLE="margin:0px;padding:0px;border:0px">
	<TR>
		<TD WIDTH="100px"><B><?= view.storage.floppycapacity.used_label ?></B></TD><TD STYLE="background:red;" WIDTH="20px"></TD><TD WIDTH="70px"><B>=Used</B></TD><TD STYLE="background:green;" WIDTH="20px"></TD><TD><B>=Free</B></TD>
	</TR>
</TABLE>
<? end ?>

<h3>Disk capacity</h3>
<pre><?= view.storage.hdcapacity.value ?></pre>

<? if (view.storage.hdcapacity.used) then ?>
<TABLE STYLE="margin:0px;padding:0px;border:0px">
	<TR>
		<TD>0%</TD><TD WIDTH="<?= view.storage.hdcapacity.used ?>%" STYLE="background:red;"><CENTER><? if ( tonumber(view.storage.hdcapacity.used) > 10) then io.write(view.storage.hdcapacity.used .. "%") end ?></CENTER></TD><TD WIDTH="<?= (100-view.storage.hdcapacity.used) ?>%" STYLE="background:green;"><CENTER><? if ( 90 > tonumber(view.storage.hdcapacity.used)) then io.write((100-view.storage.hdcapacity.used) .. "%") end ?></CENTER></TD><TD>100%</TD>
	</TR>
</TABLE>
<TABLE STYLE="margin:0px;padding:0px;border:0px">
	<TR>
		<TD WIDTH="100px"><B><?= view.storage.hdcapacity.used_label ?></B></TD><TD STYLE="background:red;" WIDTH="20px"></TD><TD WIDTH="70px"><B>=Used</B></TD><TD STYLE="background:green;" WIDTH="20px"></TD><TD><B>=Free</B></TD>
	</TR>
</TABLE>
<? end ?>

<h3>Disk partitions</h3>
<pre><?= view.storage.partitions ?></pre>

<?
--[[ DEBUG INFORMATION
require("debugs")
io.write(debugs.variables(view))
--]]
?>