diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-05-13 20:02:56 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-05-13 20:02:56 +0000 |
commit | 4b82433c8a6149f14e24bdca209bfcf54cedbaa3 (patch) | |
tree | ac5cb1d808f96ad7cded6c9ae0a73df9bd3989d5 /syslog-status-html.lsp | |
parent | 4d05e67ca4d9e29cea6fc3390a700b237a20d31e (diff) | |
download | acf-alpine-baselayout-4b82433c8a6149f14e24bdca209bfcf54cedbaa3.tar.bz2 acf-alpine-baselayout-4b82433c8a6149f14e24bdca209bfcf54cedbaa3.tar.xz |
Rewrote syslog to use components and remove view-specific code from controller.
Also made sure not to write to conf file unless all variables pass validation.
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@1116 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'syslog-status-html.lsp')
-rw-r--r-- | syslog-status-html.lsp | 43 |
1 files changed, 11 insertions, 32 deletions
diff --git a/syslog-status-html.lsp b/syslog-status-html.lsp index 5b5a8f7..f68147d 100644 --- a/syslog-status-html.lsp +++ b/syslog-status-html.lsp @@ -1,4 +1,5 @@ -<? local form = ... ?> +<? local form, viewlibrary = ... ?> +<? require("viewfunctions") ?> <? --[[ DEBUG INFORMATION io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>") @@ -6,39 +7,17 @@ io.write(html.cfe_unpack(form)) io.write("</span>") --]] ?> -<? -function informationform(myform,tags) - io.write("<DL>") - for k,v in pairs(tags) do - if (myform[v]) then - local val = myform[v] - io.write("\t<DT") - if (val.errtxt) then io.write(" class='error'") end - io.write(">" .. val.label .. "</DT>\n") - - io.write("\t\t<DD>" .. val.value .. "\n") - 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) 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> -<? -local myform = form.status -local tags = { "status", "version", } -informationform(myform,tags) -?> +<? ---[[ ?> +<? if viewlibrary and viewlibrary.dispatch_component then + viewlibrary.dispatch_component("basicstatus") +end ?> +<? --]] ?> <H2>PROGRAM SPECIFIC OPTIONS/INFORMATION</H2> +<DL> <? -local myform = form.status -local tags = { "logfile", "remotelogging", } -informationform(myform,tags) +displayitem(form.value.logfile) +displayitem(form.value.remote) ?> - - - +</DL> |