summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--syslog-config-html.lsp52
-rw-r--r--syslog-expert-html.lsp45
-rw-r--r--syslog-status-html.lsp9
3 files changed, 92 insertions, 14 deletions
diff --git a/syslog-config-html.lsp b/syslog-config-html.lsp
index abb1f75..f7aab7b 100644
--- a/syslog-config-html.lsp
+++ b/syslog-config-html.lsp
@@ -1,21 +1,30 @@
<? local view = ... ?>
-<h1>CONFIGURATION</h1>
+<h1>SYSTEM INFO</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>
+<DL>
+<dt>Program status</dt>
+<DD><? if (view.status.enabled) then io.write('Enabled') else io.write('Disabled') end ?></DD>
+</DL>
-<H2>Guided config</H2>
+<DL>
+<dt>Program version</dt>
+<dd><?= view.status.version ?></dd>
+</DL>
+
+<H1>CONFIGURATION</H1>
+<H2>Advanced config</H2>
<H3>General settings</H3>
+<DL>
<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>
+</DL>
+<DL>
<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
@@ -25,34 +34,63 @@
<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>
+</DL>
+<DL>
<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>
+</DL>
<H3>Save logs for a longer period</H3>
+<DL>
<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>
+</DL>
+<DL>
<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>
+</DL>
<H3>Remote logging</H3>
+<DL>
<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>
+</DL>
<H2>Save and apply above settings</H2>
+<DL>
<DT>Apply settings</DT>
-<DD><input class="submitxxx" type="submit" value="Apply"/></DD>
+<DD><input class="submit" type="submit" value="Apply" disabled/></DD>
+</DL>
+
+<H1>MANAGEMENT</H1>
+
+<dl>
+<dt>Program controll-panel</dt>
+<dd><form name="cmd" action="" method="POST">
+<input type=submit class="submit" name="cmd" value="start" disabled>
+<input type=submit class="submit" name="cmd" value="stop" disabled>
+<input type=submit class="submit" name="cmd" value="restart" disabled>
+</form></dd>
+</dl>
+
+<? if (view.startstop) and (view.startstop.cmdresult) then ?>
+<dl>
+<dt>Previous action result</dt>
+<dd><pre><?= view.startstop.cmdresult?></pre></dd>
+</dl>
+<? end ?>
<?
--[[ DEBUG INFORMATION
diff --git a/syslog-expert-html.lsp b/syslog-expert-html.lsp
index 5f5d6ec..a212df0 100644
--- a/syslog-expert-html.lsp
+++ b/syslog-expert-html.lsp
@@ -1,24 +1,37 @@
<? local view = ... ?>
-<h1>CONFIGURATION</h1>
+<h1>SYSTEM INFO</h1>
+
+<DL>
+<dt>Program status</dt>
+<DD><? if (view.status.enabled) then io.write('Enabled') else io.write('Disabled') end ?></DD>
+</DL>
-<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>
+<DL>
+<dt>Program version</dt>
+<dd><?= view.status.version ?></dd>
+</DL>
+
+<h1>CONFIGURATION</h1>
<H2>Expert config</H2>
<h3>File details</h3>
+<DL>
<dt>File name</dt>
<dd><?= view.file.details.path ?></dd>
+</DL>
+<DL>
<dt>File size</dt>
<dd><?= view.file.details.size ?></dd>
+</DL>
+<DL>
<dt>Last modified</dt>
<dd><?= view.file.details.mtimelong ?></dd>
+</DL>
<h3>File content</h3>
@@ -27,8 +40,28 @@
<textarea name="modifications"><?= view.file.content ?></textarea>
<H2>Save and apply above settings</H2>
+<DL>
<DT>Apply settings</DT>
-<DD><input class="submitxxx" type="submit" value="Apply"/></DD>
+<DD><input class="submit" type="submit" value="Apply" disabled/></DD>
+</DL>
+
+<H1>MANAGEMENT</H1>
+
+<dl>
+<dt>Program controll-panel</dt>
+<dd><form name="cmd" action="" method="POST">
+<input type=submit class="submit" name="cmd" value="start" disabled>
+<input type=submit class="submit" name="cmd" value="stop" disabled>
+<input type=submit class="submit" name="cmd" value="restart" disabled>
+</form></dd>
+</dl>
+
+<? if (view.startstop) and (view.startstop.cmdresult) then ?>
+<dl>
+<dt>Previous action result</dt>
+<dd><pre><?= view.startstop.cmdresult?></pre></dd>
+</dl>
+<? end ?>
<?
--[[ DEBUG INFORMATION
diff --git a/syslog-status-html.lsp b/syslog-status-html.lsp
index f97cea8..6e830ea 100644
--- a/syslog-status-html.lsp
+++ b/syslog-status-html.lsp
@@ -2,25 +2,32 @@
<h1>SYSTEM INFO</h1>
+<DL>
<dt>Program status</dt>
<DD><? if (view.status.enabled) then io.write('Enabled') else io.write('Disabled') end ?></DD>
+</DL>
+<DL>
<dt>Program version</dt>
<dd><?= view.status.version ?></dd>
+</DL>
<H2>PROGRAM SPECIFIC OPTIONS/INFORMATION</H2>
<? if (view.status.logfile) then ?>
+<DL>
<dt>Locally logging to</dt>
<dd><?= view.status.logfile ?></dd>
+</DL>
<? end ?>
<? if (view.status.remote) then ?>
+<DL>
<dt>Remote logging to</dt>
<dd><?= view.status.remote ?></dd>
+</DL>
<? end ?>
-
<?
--[[ DEBUG INFORMATION
require("debugs")