summaryrefslogtreecommitdiffstats
path: root/snort-read-html.lsp
blob: 5b10a4f5e67c7b6be652cd092d72d8e66b66be99 (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
<? local view = ... ?>
<html>
<body>
<h1>SYSTEM INFO</h1>
<dt>Program version</dt>
<dd><?= view.status.version ?></dd>
<dt>Process status</dt>
<dd><?= view.status.status ?></dd>
<dt>Daemon control</dt>
<dd><form action="" method="POST">
<input type=submit name="srvcmd" value="start" class="submit">
<input type=submit name="srvcmd" value="stop" class="submit">
<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 ?>


<h1>ALERT(S)</h1>
<dt>Status</dt>
<dd><?= view.alerts ?> alert(s)</dd>

<? if (alerts ~= "0") then ?>
<? for i = 1, view.alerts do ?>
	<h2><?= view.alertresult[i].priority ?></h2>
	<h3><?= view.alertresult[i].classification ?></h3>
		<P><B><?= view.alertresult[i][1] ?></B><BR>
		<? for j = 2, 10 do ?>
			<? if not (view.alertresult[i][j]) then break end ?>
			<?= view.alertresult[i][j] ?><BR>
		<? end ?>
		<I>(This alarm is repeated <B><?= view.alertresult[i]["count"] ?></B> times)</I></P>
<? end ?>
<? end ?>

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

</body>
</html>