weblog-status-html.lsp 866 Bytes
Newer Older
Ted Trask's avatar
Ted Trask committed
1 2 3 4 5 6 7
<% local data, viewlibrary, page_info, session = ... 
require("viewfunctions")
%>

<% displaycommandresults({"createdatabase"}, session, true) %>

<H1>Weblog Database Status</H1>
8
<DL>
Ted Trask's avatar
Ted Trask committed
9 10
<% local status
if viewlibrary and viewlibrary.dispatch_component then
11
	if viewlibrary.check_permission("postgresql/postgresql/status") then
Ted Trask's avatar
Ted Trask committed
12 13
		status = viewlibrary.dispatch_component("postgresql/postgresql/status", nil, true)
	end
14 15 16 17
end %>

<DT>Database status</DT><DD>
<% if status then %>
Ted Trask's avatar
Ted Trask committed
18 19 20 21 22
<% if status.value.status.errtxt then
	print(status.value.status.errtxt)
else
	print(status.value.status.value)
end %>
Ted Trask's avatar
Ted Trask committed
23
<% else %>
24
Unknown
Ted Trask's avatar
Ted Trask committed
25
<% end %>
26
</DD>
Ted Trask's avatar
Ted Trask committed
27

28
<DT>Weblog Database</DT><DD>
Ted Trask's avatar
Ted Trask committed
29
<% if data.value then %>
30
Present
Ted Trask's avatar
Ted Trask committed
31
<% else %>
32
Missing
Ted Trask's avatar
Ted Trask committed
33
<% end %>
34 35
</DD>
</DL>
36 37 38 39

<% if not data.value and viewlibrary and viewlibrary.dispatch_component then
	viewlibrary.dispatch_component("createdatabase")
end %>