summaryrefslogtreecommitdiffstats
path: root/snort-expert-html.lsp
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-01-15 16:03:10 +0000
committerMika Havela <mika.havela@gmail.com>2008-01-15 16:03:10 +0000
commit4bac51eb98c5b5c184b697dcb5af63ec8b999db2 (patch)
treed3828f733330c0b4a5fa6fe7dcfaf2010de0db40 /snort-expert-html.lsp
parent9c3419edaf3086aa1828be9fc2998e8cf090dd8b (diff)
downloadacf-snort-4bac51eb98c5b5c184b697dcb5af63ec8b999db2.tar.bz2
acf-snort-4bac51eb98c5b5c184b697dcb5af63ec8b999db2.tar.xz
Cleaned up code and used lib's instead.
Added functionallity to change the config-file. git-svn-id: svn://svn.alpinelinux.org/acf/snort/trunk@579 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'snort-expert-html.lsp')
-rw-r--r--snort-expert-html.lsp49
1 files changed, 42 insertions, 7 deletions
diff --git a/snort-expert-html.lsp b/snort-expert-html.lsp
index 5f5d6ec..9de9b0f 100644
--- a/snort-expert-html.lsp
+++ b/snort-expert-html.lsp
@@ -1,24 +1,37 @@
<? local view = ... ?>
-<h1>CONFIGURATION</h1>
+<h1>SYSTEM INFO</h1>
+
+<dl>
+<dt>Program status
+<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>
+<dd><?= view.file.details.mtime ?></dd>
+</DL>
<h3>File content</h3>
@@ -27,8 +40,29 @@
<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"/></DD>
+</DL>
+</form>
+
+<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">
+<input type=submit class="submit" name="cmd" value="stop">
+<input type=submit class="submit" name="cmd" value="restart">
+</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
@@ -36,3 +70,4 @@ require("debugs")
io.write(debugs.variables(view))
--]]
?>
+