summaryrefslogtreecommitdiffstats
path: root/chrony-keyfile-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'chrony-keyfile-html.lsp')
-rw-r--r--chrony-keyfile-html.lsp21
1 files changed, 21 insertions, 0 deletions
diff --git a/chrony-keyfile-html.lsp b/chrony-keyfile-html.lsp
new file mode 100644
index 0000000..9d1188c
--- /dev/null
+++ b/chrony-keyfile-html.lsp
@@ -0,0 +1,21 @@
+<% local form, viewlibrary, page_info, session = ... %>
+<% require("viewfunctions") %>
+
+<% displaycommandresults({"enablekeyfile"}, session) %>
+
+<H1>Key File Status</H1>
+<DL>
+<%
+ displayitem(form.value.status)
+ if form.value.status.errtxt then %>
+<dt></dt><dd><form action="<%= page_info.script .. page_info.prefix .. page_info.controller .. "/enablekeyfile" %>">
+<input class="submit" type="submit" value="Enable"></form></dd>
+<% end
+%>
+</DL>
+
+<%
+local pattern = string.gsub(page_info.prefix..page_info.controller, "[%(%)%.%%%+%-%*%?%[%]%^%$]", "%%%1")
+local func = haserl.loadfile(page_info.viewfile:gsub(pattern..".*$", "/") .. "filedetails-html.lsp")
+func(form, viewlibrary, page_info, session)
+%>