summaryrefslogtreecommitdiffstats
path: root/tinydns-status-html.lsp
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-02-22 15:11:01 +0000
committerMika Havela <mika.havela@gmail.com>2008-02-22 15:11:01 +0000
commit800060937ee9a859baa2157e4912a1e064ee6ca2 (patch)
tree3f1f34151a2d020cc7f04f1392c91400d8746ccb /tinydns-status-html.lsp
parent9c87ef46027f223be76d19ba0339f37c35ce23a5 (diff)
downloadacf-tinydns-800060937ee9a859baa2157e4912a1e064ee6ca2.tar.bz2
acf-tinydns-800060937ee9a859baa2157e4912a1e064ee6ca2.tar.xz
Made some progress
git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@765 ab2d0c66-481e-0410-8bed-d214d4d58bed
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