diff options
Diffstat (limited to 'weblog-status-html.lsp')
-rw-r--r-- | weblog-status-html.lsp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/weblog-status-html.lsp b/weblog-status-html.lsp index 2eb2fb5..56f0ff9 100644 --- a/weblog-status-html.lsp +++ b/weblog-status-html.lsp @@ -4,7 +4,7 @@ htmlviewfunctions = require("htmlviewfunctions") <% htmlviewfunctions.displaycommandresults({"createdatabase"}, session, true) %> -<h1>Weblog Database Status</h1> +<% local header_level = htmlviewfunctions.displaysectionstart(cfe({label="Weblog Database Status"}), page_info) %> <% local status if viewlibrary and viewlibrary.dispatch_component then if viewlibrary.check_permission("postgresql/postgresql/status") then @@ -12,27 +12,27 @@ if viewlibrary and viewlibrary.dispatch_component then end end %> -<div class='item'><p class='left'>Database status</p> -<div class='right'><p> -<% if status then %> -<% if status.value.status.errtxt then - print(status.value.status.errtxt) +<% +local statuscfe = cfe({ label="Database status" }) +if status then + statuscfe.value = status.value.status.errtxt or status.value.status.value else - print(status.value.status.value) -end %> -<% else %> -Unknown -<% end %> -</p></div></div><!-- end .item --> + statuscfe.value = "Unknown" +end +htmlviewfunctions.displayitem(statuscfe) +%> + +<% +local databasecfe = cfe({ label="Weblog Database" }) +if data.value then + databasecfe.value = "Present" +else + databasecfe.value = "Missing" +end +htmlviewfunctions.displayitem(databasecfe) +%> -<div class='item'><p class='left'>Weblog Database</p> -<div class='right'><p> -<% if data.value then %> -Present -<% else %> -Missing -<% end %> -</p></div></div><!-- end .item --> +<% htmlviewfunctions.displaysectionend(header_level) %> <% if not data.value and viewlibrary and viewlibrary.dispatch_component then viewlibrary.dispatch_component("createdatabase") |