summaryrefslogtreecommitdiffstats
path: root/weblog-status-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'weblog-status-html.lsp')
-rw-r--r--weblog-status-html.lsp27
1 files changed, 27 insertions, 0 deletions
diff --git a/weblog-status-html.lsp b/weblog-status-html.lsp
new file mode 100644
index 0000000..7ad89a2
--- /dev/null
+++ b/weblog-status-html.lsp
@@ -0,0 +1,27 @@
+<% local data, viewlibrary, page_info, session = ...
+require("viewfunctions")
+%>
+
+<% displaycommandresults({"createdatabase"}, session, true) %>
+
+<H1>Weblog Database Status</H1>
+<% local status
+if viewlibrary and viewlibrary.dispatch_component then
+ if session.permissions.postgresql.status then
+ status = viewlibrary.dispatch_component("postgresql/postgresql/status", nil, true)
+ end
+end
+if status then %>
+<p>Database is <%= status.value.status.value %>
+<% else %>
+<p>Database status unknown
+<% end %>
+
+<% if data.value then %>
+<p>Weblog Database present
+<% else %>
+<p>Weblog Database missing
+<% if viewlibrary and viewlibrary.dispatch_component then
+ viewlibrary.dispatch_component("createdatabase")
+end %>
+<% end %>