diff options
Diffstat (limited to 'openntpd-read-html.lsp')
-rw-r--r-- | openntpd-read-html.lsp | 72 |
1 files changed, 12 insertions, 60 deletions
diff --git a/openntpd-read-html.lsp b/openntpd-read-html.lsp index 08c5336..4a3a9d9 100644 --- a/openntpd-read-html.lsp +++ b/openntpd-read-html.lsp @@ -5,76 +5,28 @@ <h2>SYSTEM INFO</h2> <dt>Program version</dt> -<dd><? io.write(view.filecontent.version) ?></dd> +<dd><? io.write(view.statusinfo.version) ?></dd> <dt>Process status</dt> -<dd><? io.write(view.filecontent.status) ?></dd> +<dd><? io.write(view.statusinfo.status) ?></dd> + +<dt>Configured as server (listens)</dt> +<dd><? io.write(view.statusinfo.listenstate) ?></dd> <dt>Current time</dt> -<dd><? io.write(view.filecontent.date) ?></dd> +<dd><? io.write(view.statusinfo.date) ?></dd> + +<dt>Latest time adjustment</dt> +<dd><? io.write(view.statusinfo.timechanged) ?></dd> -<? ---[[ ?> +<? --[[ ?> <dt>TimeZone</dt> -<dd><? io.write(view.filecontent.timezone) ?></dd> +<dd><? io.write(view.statusinfo.timezone) ?></dd> <? --]] ?> -<h2>NTPD SETTINGS</h2> - -<dt>Set time immediately at startup</dt> -<dd><input type="checkbox" name=""></dd> - -<h3>'SET TIME' OPTIONS</h3> -<dt>Timeserver hosts...</dt> -<dd> -<select name="" size="3" style="width:200px;"> -<? if (view.filecontent.servers) then -for i = 1, table.maxn(view.filecontent.servers) do ?> - <option name="<? io.write(view.filecontent.servers[i].value) ?>"><? io.write(view.filecontent.servers[i].value) ?></option> -<? end end ?> -<? if (view.filecontent.server) then -for i = 1, table.maxn(view.filecontent.server) do ?> - <option name="<? io.write(view.filecontent.server[i].value) ?>"><? io.write(view.filecontent.server[i].value) ?></option> -<? end end ?> -</select><BR> -In most cases you could use <i><b>pool.ntp.org</b></i> or <i><b>[countryname].pool.ntp.org</i></b> (if listed in <i><b>http://www.pool.ntp.org/</b></i>). -</dd> - -<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.filecontent.listen) then -for i = 1, table.maxn(view.filecontent.listen) do ?> - <option name="<? io.write(view.filecontent.listen[i].value) ?>"><? io.write(view.filecontent.listen[i].value) ?></option> -<? end end ?> -</select><BR>Empty list = Not listening or acting as server; "*" = All local addresses -</dd> - -<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> - - -<h2>MANAGEMENT</h2> - -<dt>Start NTPD</dt> -<dd><form name="check" action="" method="POST"><input type=submit name="cmd" value="start" style="width:100px"></form><? if (view.startup.status) then io.write(view.startup.status) end ?></dd> - -<dt>Stop NTPD</dt> -<dd><form name="restart" action="" method="POST"><input type=submit name="cmd" value="stop" style="width:100px"></form><? if (view.shutdown.status) then io.write(view.shutdown.status) end ?></dd> - <? ----[[ DEBUG INFORMATION +--[[ DEBUG INFORMATION require("debugs") io.write(debugs.variables(view)) --]] |