diff options
-rw-r--r-- | chrony-config-html.lsp | 2 | ||||
-rw-r--r-- | chrony-details-html.lsp | 10 | ||||
-rw-r--r-- | chrony-keyfile-html.lsp | 13 | ||||
-rw-r--r-- | chrony-model.lua | 2 |
4 files changed, 13 insertions, 14 deletions
diff --git a/chrony-config-html.lsp b/chrony-config-html.lsp index 68f2d4a..2fdd23b 100644 --- a/chrony-config-html.lsp +++ b/chrony-config-html.lsp @@ -6,4 +6,4 @@ htmlviewfunctions = require("htmlviewfunctions") viewlibrary.dispatch_component("status") end %> -<% htmlviewfunctions.displayitem(form, 1, page_info) %> +<% htmlviewfunctions.displayitem(form, page_info) %> diff --git a/chrony-details-html.lsp b/chrony-details-html.lsp index 6db3274..47d4997 100644 --- a/chrony-details-html.lsp +++ b/chrony-details-html.lsp @@ -5,10 +5,14 @@ html = require("acf.html") <% viewlibrary.dispatch_component("status") %> -<h2><%= html.html_escape(data.label) %></h2> +<% local header_level = htmlviewfunctions.displaysectionstart(data, page_info) %> +<% local header_level2 = htmlviewfunctions.incrementheader(header_level) %> <% htmlviewfunctions.displayitem(data.value.time) %> <% htmlviewfunctions.displayitem(data.value.tracking) %> -<h3>Sources</h3> +<% htmlviewfunctions.displaysectionstart(data.value.sources, page_info, header_level2) %> <pre><%= html.html_escape(data.value.sources.value) %></pre> -<h3>Source Stats</h3> +<% htmlviewfunctions.displaysectionend(header_level2) %> +<% htmlviewfunctions.displaysectionstart(data.value.sourcestats, page_info, header_level2) %> <pre><%= html.html_escape(data.value.sourcestats.value) %></pre> +<% htmlviewfunctions.displaysectionend(header_level2) %> +<% htmlviewfunctions.displaysectionend(header_level) %> diff --git a/chrony-keyfile-html.lsp b/chrony-keyfile-html.lsp index 644483b..8ae41fc 100644 --- a/chrony-keyfile-html.lsp +++ b/chrony-keyfile-html.lsp @@ -4,18 +4,13 @@ <% htmlviewfunctions.displaycommandresults({"enablekeyfile"}, session) %> -<h1>Key File Status</h1> <% + local header_level = htmlviewfunctions.displaysectionstart(form.value.status, page_info) htmlviewfunctions.displayitem(form.value.status) if form.value.status.errtxt then - -%> -<div class='item'><p class='left'></p><div class='right'> -<form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/enablekeyfile") %>"> -<input class="hidden" type="hidden" name="redir" value="<%= html.html_escape(page_info.orig_action) %>" > -<input class="submit" type="submit" name="submit" value="Enable"></form> -</div></div><!-- end .item --> -<% end + htmlviewfunctions.displayitem(cfe({type="form", value={redir=cfe({ type="hidden", value=page_info.orig_action })}, label="", option="Enable", action="enablekeyfile" }), page_info, 0) + end + htmlviewfunctions.displaysectionend(header_level) %> <% diff --git a/chrony-model.lua b/chrony-model.lua index a1b937f..8661e20 100644 --- a/chrony-model.lua +++ b/chrony-model.lua @@ -53,7 +53,7 @@ local function get_keyfilestatus(filedetails) filedetails.value.filecontent.descr = "List of password numbers and passwords (ie. '10 cronpass')" -- check to see if the file is being used - filedetails.value.status = cfe({ value="Key file in use", label="Key file status" }) + filedetails.value.status = cfe({ value="Key file in use", label="Key File Status" }) local config = mymodule.get_config() if config.value.keyfile.value ~= keyfile then filedetails.value.status.value = "" |