plugins/mod_admin_shell.lua
changeset 11611 03eb4c0dca27
parent 11610 0b65d43f4da4
child 11740 ddb87df3de30
--- a/plugins/mod_admin_shell.lua	Sat Jun 12 18:06:13 2021 +0200
+++ b/plugins/mod_admin_shell.lua	Sat Jun 12 18:06:37 2021 +0200
@@ -410,6 +410,14 @@
 		["net-provider"] = "Network service",
 		["storage-provider"] = "Storage driver",
 	};
+	local item_formatters = {
+		["feature"] = tostring,
+		["identity"] = function(ident) return ident.type .. "/" .. ident.category; end,
+		["adhoc-provider"] = function(item) return item.name; end,
+		["auth-provider"] = function(item) return item.name; end,
+		["storage-provider"] = function(item) return item.name; end,
+	};
+
 	for host in hosts do
 		local mod = modulemanager.get_module(host, name);
 		if mod.module.host == "*" then
@@ -426,6 +434,12 @@
 			for kind, items in pairs(mod.module.items) do
 				local label = friendly_descriptions[kind] or kind:gsub("%-", " "):gsub("^%a", string.upper);
 				print(string.format("  - %s (%d item%s)", label, #items, #items > 1 and "s" or ""));
+				local formatter = item_formatters[kind];
+				if formatter then
+					for _, item in ipairs(items) do
+						print("    - " .. formatter(item));
+					end
+				end
 			end
 		end
 		if mod.module.dependencies and next(mod.module.dependencies) ~= nil then