summaryrefslogtreecommitdiffstats
path: root/health-storage-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'health-storage-html.lsp')
-rw-r--r--health-storage-html.lsp48
1 files changed, 20 insertions, 28 deletions
diff --git a/health-storage-html.lsp b/health-storage-html.lsp
index 0aa11ae..786a32c 100644
--- a/health-storage-html.lsp
+++ b/health-storage-html.lsp
@@ -3,72 +3,64 @@
<% displaydisk = function(disk, name)
io.write("<pre>"..html.html_escape(disk.value).."</pre>\n")
-io.write('<TABLE STYLE="margin:0px;padding:0px;border:0px">\n')
-io.write(" <TR>\n")
-io.write(" <TD>0%</TD>\n")
+io.write('<table style="margin:0px;padding:0px;border:0px">\n')
+io.write(" <tr>\n")
+io.write(" <td>0%</td>\n")
if tonumber(disk.used) > 0 then
- io.write(' <TD WIDTH="'..html.html_escape(disk.used)..'%" STYLE="background:red;border:2px solid black;')
+ io.write(' <td width="'..html.html_escape(disk.used)..'%" style="background:red;border:2px solid black;')
if tonumber(disk.used) < 100 then io.write('border-right:none;') end
- io.write('"><CENTER><B>')
+ io.write('"><center><b>')
if ( tonumber(disk.used) > 10) then io.write(html.html_escape(disk.used) .. "%") end
- io.write('</B></CENTER></TD>\n')
+ io.write('</b></center></td>\n')
end
if tonumber(disk.used) < 100 then
- io.write(' <TD WIDTH="'..(100-tonumber(disk.used))..'%" STYLE="background:#0c0;border:2px solid black;')
+ io.write(' <td width="'..(100-tonumber(disk.used))..'%" style="background:#0c0;border:2px solid black;')
if tonumber(disk.used) > 0 then io.write('border-left:none;') end
- io.write('"><CENTER><B>')
+ io.write('"><center><b>')
if ( 90 > tonumber(disk.used)) then io.write((100-tonumber(disk.used)) .. "%") end
- io.write('</B></CENTER></TD>\n')
+ io.write('</b></center></td>\n')
end
-io.write(' <TD>100%</TD>\n')
-io.write(" </TR>\n")
-io.write("</TABLE>\n")
-io.write('<TABLE STYLE="margin:0px;padding:0px;border:0px;margin-top:5px;">\n')
-io.write(" <TR>\n")
-io.write(' <TD WIDTH="100px"><B>'..html.html_escape(name)..'</B></TD><TD STYLE="background:red;border:2px solid black;" WIDTH="20px"></TD><TD WIDTH="70px"><B>=Used</B></TD><TD STYLE="background:#0c0;border:2px solid black;" WIDTH="20px"></TD><TD><B>=Free</B></TD>\n')
-io.write(" </TR>\n")
-io.write("</TABLE>\n")
+io.write(' <td>100%</td>\n')
+io.write(" </tr>\n")
+io.write("</table>\n")
+io.write('<table style="margin:0px;padding:0px;border:0px;margin-top:5px;">\n')
+io.write(" <tr>\n")
+io.write(' <td width="100px"><b>'..html.html_escape(name)..'</b></td><td style="background:red;border:2px solid black;" width="20px"></td><td width="70px"><b>=Used</b></td><td style="background:#0c0;border:2px solid black;" width="20px"></td><td><b>=Free</b></td>\n')
+io.write(" </tr>\n")
+io.write("</table>\n")
end %>
<h1>Storage</h1>
<h2>Floppy capacity</h2>
-<DL>
<% if (view.value.floppy) then
for name,floppy in pairs(view.value.floppy.value) do
displaydisk(floppy, name)
end
else %>
-No Floppy mounted
+<p>No Floppy mounted</p>
<% end %>
-</DL>
<h2>Harddrive capacity</h2>
-<DL>
<% if (view.value.hd) then
for name,hd in pairs(view.value.hd.value) do
displaydisk(hd, name)
end
else %>
-No Harddrive mounted
+<p>No Harddrive mounted</p>
<% end %>
-</DL>
<h2>RAM Disk capacity</h2>
-<DL>
<% if (view.value.ramdisk) then
for name,ramdisk in pairs(view.value.ramdisk.value) do
displaydisk(ramdisk, name)
end
else %>
-No RAM Disk mounted
+<p>No RAM Disk mounted</p>
<% end %>
-</DL>
<% if view.value.partitions then %>
<h2>Disk partitions</h2>
-<DL>
<pre><%= html.html_escape(view.value.partitions.value) %></pre>
-</DL>
<% end %>