summaryrefslogtreecommitdiffstats
path: root/openntpd-settings-html.lsp
blob: f79da465dfcaa0af1ad5a98556a283ca3b588d01 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<? local view = ... ?>

<h1>System time</h1>

<h2>SYSTEM INFO</h2>

<dt>Process status</dt>
<dd><? io.write(view.statusinfo.status) ?><? if (view.startstop.status) then io.write(" (" .. view.startstop.status .. ")") end  ?></dd>

<dt>Start or stop process</dt>
<dd><form name="start" action="" method="POST"><input type=submit name="cmd" value="start" style="width:100px"></form><form name="stop" action="" method="POST"><input type=submit name="cmd" value="stop" style="width:100px"></form></dd>


<h2>NTPD SETTINGS</h2>

<? --[[ FIXME!!! ?>
<dt>Set time immediately at startup</dt>
<dd><input type="checkbox" name=""></dd>

<dt>Save the above settings</dt>
<dd><input type="submit" value="Save"> (see above)</dd>
<? --]] ?>

<h3>'SET TIME' OPTIONS</h3>

<dt>Timeserver hosts...</dt>
<dd>
<select name="" size="3" style="width:200px;">
<? if (view.statusinfo.servers) then 
for i = 1, table.maxn(view.statusinfo.servers) do ?>
	<option name="<? io.write(view.statusinfo.servers[i].value) ?>"><? io.write(view.statusinfo.servers[i].value) ?></option>
<? end end ?>
<? if (view.statusinfo.server) then
for i = 1, table.maxn(view.statusinfo.server) do ?>
	<option name="<? io.write(view.statusinfo.server[i].value) ?>"><? io.write(view.statusinfo.server[i].value) ?></option>
<? end end ?>
</select><BR>
In most cases you could use <i><b>pool.ntp.org</b></i> or<br><i><b>[countryname].pool.ntp.org</i></b> (if listed in <i><b>http://www.pool.ntp.org/</b></i>).
</dd>

<? ---[[ FIXME!!! ?>
<dt>Delete selected host</dt>
<dd><input type="submit" value="Delete"> (see above)</dd>

<dt>Add new host</dt>
<dd><input type="text" name="" value=""> <input type="submit" value="Add"></dd>
<? --]] ?>

<h3>'PRESENT TIME' OPTIONS (ACT AS TIME SERVER)</h3>
<dt>Listen on address...</dt>
<dd>
<select name="" size="3" style="width:200px;">
<? if (view.statusinfo.listen) then
for i = 1, table.maxn(view.statusinfo.listen) do ?>
	<option name="<? io.write(view.statusinfo.listen[i].value) ?>"><? io.write(view.statusinfo.listen[i].value) ?></option>
<? end end ?>
</select><BR>Empty list = Listening (acting as server) is disabled<br>"*" = Listen on all local addresses
</dd>

<? ---[[ FIXME!!! ?>
<dt>Delete selected address</dt>
<dd><input type="submit" value="Delete"> (see above)</dd>


<dt>Add new listen address</dt>
<dd><input type="text" name="" value=""> <input type="submit" value="Add"></dd>
<? --]] ?>



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