Changeset

11850:bfa85965106e

mod_admin_shell: Show HTTP base-URLs in module:info() Because it's nice, not having to find it in http:list(), which could have a lot of items.
author Kim Alvefur <zash@zash.se>
date Wed, 13 Oct 2021 20:46:04 +0200
parents 11849:7440d610e5f1
children 11851:8f1e7fd55e7b
files plugins/mod_admin_shell.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua	Wed Oct 13 10:04:11 2021 +0100
+++ b/plugins/mod_admin_shell.lua	Wed Oct 13 20:46:04 2021 +0200
@@ -420,6 +420,7 @@
 		["adhoc-provider"] = function(item) return item.name; end,
 		["auth-provider"] = function(item) return item.name; end,
 		["storage-provider"] = function(item) return item.name; end,
+		["http-provider"] = function(item, mod) return mod:http_url(item.name); end,
 	};
 
 	for host in hosts do
@@ -441,7 +442,7 @@
 				local formatter = item_formatters[kind];
 				if formatter then
 					for _, item in ipairs(items) do
-						print("    - " .. formatter(item));
+						print("    - " .. formatter(item, mod.module));
 					end
 				end
 			end