mirror of
https://github.com/bjc/prosody.git
synced 2025-04-06 22:57:38 +03:00
mod_admin_shell: Visual tweaks to the output of debug:cert_index()
This commit is contained in:
parent
07c3ce955c
commit
db3735d974
1 changed files with 9 additions and 2 deletions
|
@ -2410,10 +2410,17 @@ function def_env.debug:cert_index(path)
|
||||||
|
|
||||||
local sink = logger.add_simple_sink(function (source, level, message)
|
local sink = logger.add_simple_sink(function (source, level, message)
|
||||||
if source == "certmanager" then
|
if source == "certmanager" then
|
||||||
self.session.print(source, level, message);
|
if level == "debug" or level == "info" then
|
||||||
|
level = "II";
|
||||||
|
elseif level == "warn" or level == "error" then
|
||||||
|
level = "EE";
|
||||||
|
end
|
||||||
|
self.session.print(level..": "..message);
|
||||||
end
|
end
|
||||||
end);
|
end);
|
||||||
|
|
||||||
|
print("II: Scanning "..path.."...");
|
||||||
|
|
||||||
local index = {};
|
local index = {};
|
||||||
cm.index_certs(path, index)
|
cm.index_certs(path, index)
|
||||||
|
|
||||||
|
@ -2436,7 +2443,7 @@ function def_env.debug:cert_index(path)
|
||||||
{ title = "Service", width = 5 };
|
{ title = "Service", width = 5 };
|
||||||
}, self.session.width);
|
}, self.session.width);
|
||||||
print(row());
|
print(row());
|
||||||
|
print(("-"):rep(self.session.width or 80));
|
||||||
for domain, certs in it.sorted_pairs(index) do
|
for domain, certs in it.sorted_pairs(index) do
|
||||||
for cert_file, services in it.sorted_pairs(certs) do
|
for cert_file, services in it.sorted_pairs(certs) do
|
||||||
for service in it.sorted_pairs(services) do
|
for service in it.sorted_pairs(services) do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue