ipsectools-expert-html.lsp 1.22 KB
Newer Older
Mika Havela's avatar
Mika Havela committed
1 2
<? local form = ... ?>
<?
Mika Havela's avatar
Mika Havela committed
3
require("viewfunctions")
Mika Havela's avatar
Mika Havela committed
4 5 6 7 8 9 10 11 12 13 14 15 16
?>

<H1>SYSTEM INFO</H1>
<DL>
<? 
local myform = form.status 
local tags = { "status", "version", "autostart", }
displayinfo(myform,tags,"viewonly")
?>
</DL>

<form name="myform" action="" method="POST">
<h1>CONFIGURATION</h1>
17
<H2>Expert config - Config</H2>
Mika Havela's avatar
Mika Havela committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
<h3>File details</h3>
<DL>
<? 
local myform = form.file 
local tags = { "filename", "filesize", "mtime", "sumerrors", }
displayinfo(myform,tags,"viewonly")
?>
</DL>

<H3>FILE CONTENT</H3>
<? 
local myform = form.file
io.write(html.form[myform.filecontent.type](myform.filecontent))
?>

33 34 35 36
<H2>Expert config - Policy</H2>
<h3>File details</h3>
<DL>
<? 
37
local myform = form.file2
38 39 40 41 42 43 44 45 46 47
local tags = { "filename2", "filesize2", "mtime2", "sumerrors2", }
displayinfo(myform,tags,"viewonly")
?>
</DL>

<H3>FILE CONTENT</H3>
<? 
io.write(html.form[myform.filecontent2.type](myform.filecontent2))
?>

48
<H2>SAVE AND APPLY ABOVE SETTINGS</H2>
49 50
<DL>
<? 
51 52
local myform = form.file
local tags = { "cmdsave", }
53 54 55 56
displayinfo(myform,tags)
?>
</DL>

Mika Havela's avatar
Mika Havela committed
57
<?
Mika Havela's avatar
Mika Havela committed
58 59 60 61 62 63 64 65
-- Management buttons
local myform = form.management
local tags = { "start", "stop", "restart" }
if (myform) then
	io.write("<H1>MANAGEMENT</H1>\n<DL>")
	displaymanagement(myform,tags)
	io.write("</DL>")
end
Mika Havela's avatar
Mika Havela committed
66
?>
Mika Havela's avatar
Mika Havela committed
67
</form>
Mika Havela's avatar
Mika Havela committed
68