ipsectools-expert-html.lsp 1.22 KB
Newer Older
Natanael Copa's avatar
Natanael Copa committed
1 2
<% local form = ... %>
<%
Mika Havela's avatar
Mika Havela committed
3
require("viewfunctions")
Natanael Copa's avatar
Natanael Copa committed
4
%>
Mika Havela's avatar
Mika Havela committed
5 6 7

<H1>SYSTEM INFO</H1>
<DL>
Natanael Copa's avatar
Natanael Copa committed
8
<% 
Mika Havela's avatar
Mika Havela committed
9 10 11
local myform = form.status 
local tags = { "status", "version", "autostart", }
displayinfo(myform,tags,"viewonly")
Natanael Copa's avatar
Natanael Copa committed
12
%>
Mika Havela's avatar
Mika Havela committed
13 14 15 16
</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
<h3>File details</h3>
<DL>
Natanael Copa's avatar
Natanael Copa committed
20
<% 
Mika Havela's avatar
Mika Havela committed
21 22 23
local myform = form.file 
local tags = { "filename", "filesize", "mtime", "sumerrors", }
displayinfo(myform,tags,"viewonly")
Natanael Copa's avatar
Natanael Copa committed
24
%>
Mika Havela's avatar
Mika Havela committed
25 26 27
</DL>

<H3>FILE CONTENT</H3>
Natanael Copa's avatar
Natanael Copa committed
28
<% 
Mika Havela's avatar
Mika Havela committed
29 30
local myform = form.file
io.write(html.form[myform.filecontent.type](myform.filecontent))
Natanael Copa's avatar
Natanael Copa committed
31
%>
Mika Havela's avatar
Mika Havela committed
32

33 34 35
<H2>Expert config - Policy</H2>
<h3>File details</h3>
<DL>
Natanael Copa's avatar
Natanael Copa committed
36
<% 
37
local myform = form.file2
38 39
local tags = { "filename2", "filesize2", "mtime2", "sumerrors2", }
displayinfo(myform,tags,"viewonly")
Natanael Copa's avatar
Natanael Copa committed
40
%>
41 42 43
</DL>

<H3>FILE CONTENT</H3>
Natanael Copa's avatar
Natanael Copa committed
44
<% 
45
io.write(html.form[myform.filecontent2.type](myform.filecontent2))
Natanael Copa's avatar
Natanael Copa committed
46
%>
47

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

Natanael Copa's avatar
Natanael Copa 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
Natanael Copa's avatar
Natanael Copa committed
66
%>
Mika Havela's avatar
Mika Havela committed
67
</form>
Mika Havela's avatar
Mika Havela committed
68