summaryrefslogtreecommitdiffstats
path: root/openntpd-config-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'openntpd-config-html.lsp')
-rw-r--r--openntpd-config-html.lsp70
1 files changed, 12 insertions, 58 deletions
diff --git a/openntpd-config-html.lsp b/openntpd-config-html.lsp
index 97a5a97..a84e5f2 100644
--- a/openntpd-config-html.lsp
+++ b/openntpd-config-html.lsp
@@ -1,4 +1,4 @@
-<% local form = ...
+<% local form, viewlibrary, page_info = ...
require("viewfunctions")
%>
<%
@@ -9,63 +9,17 @@ io.write("</span>")
--]]
%>
-<H1>SYSTEM INFO</H1>
-<DL>
-<%
-local myform = form.status
-local tags = { "status", "version", "autostart", }
-displayinfo(myform,tags,"viewonly")
-%>
-</DL>
-
-<form name="cmd" action="" method="POST">
-<h1>CONFIGURATION</h1>
-<H2>Advanced config</H2>
-<H3>General settings</H3>
-<DL>
-<%
-local myform = form.config
-local tags = { "setstimeonstartup", "cmdsavesetstimeonstartup", }
-displayinfo(myform,tags)
-%>
-</DL>
-
-
-<h3>'SET TIME' OPTIONS</h3>
-<DL>
-<%
-local myform = form.config
-local tags = { "hosts_list", "hosts_cmd_delete", }
-displayinfo(myform,tags)
-%>
-</DL>
-
-<DL>
-<%
-local myform = form.config
-local tags = { "hosts_add", "hosts_type", "hosts_cmd_add", }
-displayinfo(myform,tags)
-%>
-</DL>
-
-
-<h3>'PRESENT TIME' OPTIONS (ACT AS TIME SERVER)</h3>
-<DL>
-<%
-local myform = form.config
-local tags = { "listen_list", "listen_cmd_delete", "listen_add", "listen_cmd_add", }
-displayinfo(myform,tags)
-%>
-</DL>
+<% if viewlibrary and viewlibrary.dispatch_component then
+viewlibrary.dispatch_component("status")
+end %>
+<H1><%= form.label %></H1>
<%
--- 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
+ form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action
+ local order = { "setstimeonstartup", "listen", "server", "servers" }
+ displayform(form, order)
%>
-</form>
+
+<% if viewlibrary and viewlibrary.dispatch_component then
+ viewlibrary.dispatch_component("startstop")
+end %>