summaryrefslogtreecommitdiffstats
path: root/lbu-status-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'lbu-status-html.lsp')
-rw-r--r--lbu-status-html.lsp45
1 files changed, 9 insertions, 36 deletions
diff --git a/lbu-status-html.lsp b/lbu-status-html.lsp
index 99d1dbe..eb1997b 100644
--- a/lbu-status-html.lsp
+++ b/lbu-status-html.lsp
@@ -1,4 +1,6 @@
-<? local form = ... ?>
+<? local form = ...
+require("viewfunctions")
+?>
<?
--[[ DEBUG INFORMATION
io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
@@ -6,55 +8,26 @@ io.write(html.cfe_unpack(form))
io.write("</span>")
--]]
?>
-<?
-function displayinfo(myform,tags,viewonly)
- io.write("<DL>")
- for k,v in pairs(tags) do
- if (myform[v]) and (myform[v]["value"]) then
- local val = myform[v]
- io.write("\t<DT")
- if (#val.errtxt > 0) then io.write(" class='error'") end
- io.write(">" .. val.label .. "</DT>\n")
- if (viewonly) then
- io.write("\t\t<DD>" .. val.value .. "\n")
- else
- io.write("\t\t<DD>" .. html.form[val.type](val) .. "\n")
- end
- if (val.descr) and (#val.descr > 0) then io.write("\t\t<P CLASS='descr'>" .. string.gsub(val.descr, "\n", "<BR>") .. "</P>\n") end
- if (#val.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end
- io.write("\t\t</DD>\n")
- end
- end
- io.write("</DL>")
-end
-?>
<H1>SYSTEM INFO</H1>
+<DL>
<?
local myform = form.status
local tags = { "status", "version", }
displayinfo(myform,tags,"viewonly")
?>
+</DL>
<H2>PROGRAM SPECIFIC OPTIONS/INFORMATION</H2>
+<DL>
<?
local tags = { "LBU_MEDIA","ENCRYPTION", }
displayinfo(myform,tags,"viewonly")
?>
+</DL>
<H2>CHANGES SINCE LAST COMMIT</H2>
-<dl>
+<DL>
<dt>Files changed since last commit</dt>
<dd><pre><? for i = 1, table.maxn(form.lbustatus) do io.write(form.lbustatus[i]["status"] .. "\t" .. form.lbustatus[i]["name"] .. "\n") end ?><? if (#form.lbustatus == 0) then io.write("None") end ?></pre></DD>
-</dl>
-
-
-<?
---[[ 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>")
---]]
-?>
-
-<? -- vim: set filetype=lua : ?>
+</DL>