summaryrefslogtreecommitdiffstats
path: root/syslog-config-html.lsp
blob: abb1f7576e4cf43b6c7361e4f0ec7b7889f9593e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<? local view = ... ?>

<h1>CONFIGURATION</h1>

<H2>Enable/Disable</H2>
<DT>Change status for this program</DT>
<DD><input class="radio" type="radio" name="enabled" value="2" <? if (view.status.enabled) then io.write('checked') end ?> >Enable
<input class="radio" type="radio" name="enabled" value="3" <? if not (view.status.enabled) then io.write('checked') end ?> >Disable</DD>

<H2>Guided config</H2>
<H3>General settings</H3>

<DT><?= view.config.logfile.label ?></DT>
<DD><input type="text" class="text" name="smallerlogg" value="<?= view.config.logfile.value ?>"/>
<P>(default=/var/log/messages)</P>
<p class="error"><?= view.config.logfile.errtxt ?></p>
</DD>

<DT><?= view.config.loglevel.label ?></DT>
<DD><input class="radio" type="radio" name="loglevel" value="1" <? if (tostring(view.config.loglevel.value) == "1") then io.write('checked') end ?>>1
<input class="radio" type="radio" name="loglevel" value="2" <? if (tostring(view.config.loglevel.value) == "2") then io.write('checked') end ?>>2
<input class="radio" type="radio" name="loglevel" value="3" <? if (tostring(view.config.loglevel.value) == "3") then io.write('checked') end ?>>3
<input class="radio" type="radio" name="loglevel" value="4" <? if (tostring(view.config.loglevel.value) == "4") then io.write('checked') end ?>>4
<input class="radio" type="radio" name="loglevel" value="5" <? if (tostring(view.config.loglevel.value) == "5") then io.write('checked') end ?>>5
<input class="radio" type="radio" name="loglevel" value="" <? if (tostring(view.config.loglevel.value) == "") then io.write('checked') end ?>>Default
<p><?= view.config.loglevel.helptxt ?></P>
<p class="error"><?= view.config.loglevel.errtxt ?></p></DD>

<DT><?= view.config.smallog.label ?></DT>
<DD><input type="checkbox" name="smallog" <? if (view.config.smallog.value ~= "") then io.write('checked') end ?>/><p class="error"><?= view.config.smallog.errtxt ?></p></DD>

<H3>Save logs for a longer period</H3>
<DT><?= view.config.maxsize.label ?></DT>
<DD><input type="text" class="text" name="maxsize" value="<?= view.config.maxsize.value ?>"/>
<p>(default=200KB, 0=off)</p>
<p class="error"><?= view.config.maxsize.errtxt ?></p>
</DD>

<DT><?= view.config.logrotate.label ?></DT>
<DD><input type="text" class="text" name="logrotate" value="<?= view.config.logrotate.value ?>"/>
<p>(default=1, max=99, 0=purge)</p>
<p class="error"><?= view.config.logrotate.errtxt ?></p>
</DD>

<H3>Remote logging</H3>

<DT><?= view.config.remote.label ?></DT>
<DD><input type="text" class="text" name="host" value="<?= view.config.remote.value ?>"/>
<P>(default PORT=514/UDP)</P>
<p class="error"><?= view.config.remote.errtxt ?></p>
</DD>

<H2>Save and apply above settings</H2>
<DT>Apply settings</DT>
<DD><input class="submitxxx" type="submit" value="Apply"/></DD>

<?
--[[ DEBUG INFORMATION
require("debugs")
io.write(debugs.variables(view))
--]]
?>