summaryrefslogtreecommitdiffstats
path: root/tinydns-status-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'tinydns-status-html.lsp')
-rw-r--r--tinydns-status-html.lsp19
1 files changed, 14 insertions, 5 deletions
diff --git a/tinydns-status-html.lsp b/tinydns-status-html.lsp
index 5d5bd1d..024bb13 100644
--- a/tinydns-status-html.lsp
+++ b/tinydns-status-html.lsp
@@ -1,6 +1,6 @@
<? local form = ... ?>
<?
----[[ DEBUG INFORMATION
+--[[ DEBUG INFORMATION
io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
io.write(html.cfe_unpack(form))
io.write("</span>")
@@ -78,11 +78,20 @@ local function recurseoutput(table,cnt)
if not (cnt) then cnt=0 end
cnt = cnt + 1
for k,v in pairs(table or {}) do
- if (type(v) == "string") then
- io.write("<IMG SRC='/static/tango/16x16/devices/computer.png' width='16' height='16' alt STYLE='margin-left:"..cnt.."0px'> "..
- tostring(v) .. "</SPAN><BR>")
+ if (type(v["name"]) == "string") then
+ io.write("<IMG SRC='/static/tango/16x16/devices/computer.png' width='16' height='16' alt STYLE='margin-left:"..cnt..
+ "0px'><SPAN STYLE='font-weight:bold;'> ".. tostring(v["label"]) .. "</SPAN><BR>")
+ if (#v > 0) then
+ io.write("<TABLE STYLE='margin-left:"..( cnt + 3).."0px;'>")
+ for i=1,#v do
+ if (type(v[i]["label"]) == "string") then
+ io.write("<TR><TD STYLE='padding-right:20px;font-weight:bold;'>".. tostring(v[i]["label"]) .. "</TD><TD WIDTH='99%'>".. tostring(v[i]["value"]) .."</TD></TR>")
+ end
+ end
+ io.write("</TABLE>")
+ end
else
- io.write("<SPAN STYLE='margin-left:"..cnt.."0px;font-wegith:strong;'> "..
+ io.write("<SPAN STYLE='margin-left:"..cnt.."0px;font-weight:bold;'> "..
tostring(k) .. "</SPAN><BR>")
recurseoutput(v,cnt)
end