summaryrefslogtreecommitdiffstats
path: root/syslog-config-html.lsp
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-01-09 12:27:39 +0000
committerMika Havela <mika.havela@gmail.com>2008-01-09 12:27:39 +0000
commit9ad995cea4060451485664a102657dfe82258dc8 (patch)
treea7d82dce97c313c445fce9bccba0890d87a28460 /syslog-config-html.lsp
parent8b44052f3210ffaca4b4e51506b5eec295f16fda (diff)
downloadacf-alpine-baselayout-9ad995cea4060451485664a102657dfe82258dc8.tar.bz2
acf-alpine-baselayout-9ad995cea4060451485664a102657dfe82258dc8.tar.xz
Showing current config starting to work (still some problems with RegExpr in model). Saving changes still doesn't work.
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@519 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'syslog-config-html.lsp')
-rw-r--r--syslog-config-html.lsp38
1 files changed, 23 insertions, 15 deletions
diff --git a/syslog-config-html.lsp b/syslog-config-html.lsp
index 0ced54f..b32d323 100644
--- a/syslog-config-html.lsp
+++ b/syslog-config-html.lsp
@@ -1,9 +1,9 @@
-<? ctl = ... ?>
+<? view = ... ?>
<h1>System logging</h1>
<h2>System info</h2>
<form>
<DT>Process status</DT>
-<DD><?= ctl.status ?></DD>
+<DD><?= view.status.status ?></DD>
<DT>Daemon control</DT>
<dd><form action="" method="POST">
@@ -12,45 +12,52 @@
<input type=submit name="srvcmd" value="restart" class="submit"></form>
</dd>
+<? if (view.srvcmdresult) then ?>
+<dt>Previous action</dt>
+<dd><pre><?= view.srvcmdresult ?></pre></dd>
+<? end ?>
+
<H2>Configuration</H2>
<H3>General settings</H3>
<DT>Log to given file</DT>
-<DD><input type="text" class="text" name="smallerlogg"/>
+<DD><input type="text" class="text" name="smallerlogg" value="<?= view.config.logfile ?>"/>
<P>(default=/var/log/messages)</P></DD>
<DT>Set local log level</DT>
-<DD><input class="radio" type="radio" name="loglevel" value="1">1
-<input class="radio" type="radio" name="loglevel" value="2">2
-<input class="radio" type="radio" name="loglevel" value="3">3
-<input class="radio" type="radio" name="loglevel" value="4">4
-<input class="radio" type="radio" name="loglevel" value="5">5
-<p>(1=Quiet, 5=Noisy)</P>
+<DD><input class="radio" type="radio" name="loglevel" value="1" <? if (tostring(view.config.loglevel) == "1") then io.write('checked') end ?>>1
+<input class="radio" type="radio" name="loglevel" value="2" <? if (tostring(view.config.loglevel) == "2") then io.write('checked') end ?>>2
+<input class="radio" type="radio" name="loglevel" value="3" <? if (tostring(view.config.loglevel) == "3") then io.write('checked') end ?>>3
+<input class="radio" type="radio" name="loglevel" value="4" <? if (tostring(view.config.loglevel) == "4") then io.write('checked') end ?>>4
+<input class="radio" type="radio" name="loglevel" value="5" <? if (tostring(view.config.loglevel) == "5") then io.write('checked') end ?>>5
+<input class="radio" type="radio" name="loglevel" value="" <? if (tostring(view.config.loglevel) == "") then io.write('checked') end ?>>Default
+<p>(1=Quiet, 5=Noisy, Default=Not specifyed any loglevel in the config)</P>
</DD>
<DT>Smaller logging output</DT>
-<DD><input type="checkbox" name="smallerlogg"/></DD>
+<DD><input type="checkbox" name="smallog" <? if (view.config.smallog) then io.write('checked') end ?>/></DD>
<H3>Save logs for a longer period</H3>
<DT>Max size (KB) before rotate</DT>
-<DD><input type="text" class="text" name="smallerlogg"/>
+<DD><input type="text" class="text" name="maxsize" value="<?= view.config.maxsize ?>"/>
<p>(default=200KB, 0=off)</p>
</DD>
<DT>Number of rotated logs to keep</DT>
-<DD><input type="text" class="text" name="smallerlogg"/>
+<DD><input type="text" class="text" name="logrotate" value="<?= view.config.logrotate ?>"/>
<p>(default=1, max=99, 0=purge)</p>
</DD>
<H3>Remote logging</H3>
-<DT>Log to IP or hostname on PORT</DT><DD><input type="text" class="text" value="<?= ctl.host ?>" name="host"/>
+<DT>Log to IP or hostname on PORT</DT>
+<DD><input type="text" class="text" name="host" value="<?= view.config.remote ?>"/>
<P>(default PORT=514/UDP)</P></DD>
<H2>Save above settings</H2>
-<DT>Apply settings</DT>
-<DD><input class="submit" type="submit" value="Apply"/></DD>
+<DT>Save settings</DT>
+<DD><input class="submit" type="submit" value="Save"/></DD>
</form>
@@ -61,3 +68,4 @@ require("debugs")
io.write(debugs.variables(view))
--]]
?>
+