diff --git a/src/node/hooks/express/adminplugins.js b/src/node/hooks/express/adminplugins.js index 7b21206c9..fc274a075 100644 --- a/src/node/hooks/express/adminplugins.js +++ b/src/node/hooks/express/adminplugins.js @@ -16,6 +16,11 @@ exports.expressCreateServer = function (hook_name, args, cb) { "ep_etherpad-lite/templates/admin/plugins.html", render_args), {}); }); + args.app.get('/admin/plugins/info', function(req, res) { + res.send(eejs.require( + "ep_etherpad-lite/templates/admin/plugins-info.html", + {}), {}); + }); } exports.socketio = function (hook_name, args, cb) { diff --git a/src/static/js/pluginfw/plugins.js b/src/static/js/pluginfw/plugins.js index 1f66da41c..1d4862230 100644 --- a/src/static/js/pluginfw/plugins.js +++ b/src/static/js/pluginfw/plugins.js @@ -41,14 +41,16 @@ exports.formatParts = function () { return _.map(exports.parts, function (part) { return part.full_name; }).join("\n"); }; -exports.formatHooks = function () { +exports.formatHooks = function (hook_set_name) { var res = []; - _.chain(exports.hooks).keys().forEach(function (hook_name) { - _.forEach(exports.hooks[hook_name], function (hook) { - res.push(hook.hook_name + ": " + hook.hook_fn_name + " from " + hook.part.full_name); + var hooks = exports.extractHooks(exports.parts, hook_set_name || "hooks"); + + _.chain(hooks).keys().forEach(function (hook_name) { + _.forEach(hooks[hook_name], function (hook) { + res.push("
" + hook.hook_name + "
" + hook.hook_fn_name + " from " + hook.part.full_name + "
"); }); }); - return res.join("\n"); + return "
" + res.join("\n") + "
"; }; exports.loadFn = function (path, hookName) { @@ -62,7 +64,7 @@ exports.loadFn = function (path, hookName) { return fn; }; -exports.extractHooks = function (parts, hook_set_name, plugins) { +exports.extractHooks = function (parts, hook_set_name) { var hooks = {}; _.each(parts,function (part) { _.chain(part[hook_set_name] || {}) diff --git a/src/templates/admin/plugins.html b/src/templates/admin/plugins.html index 970012696..104f6b986 100644 --- a/src/templates/admin/plugins.html +++ b/src/templates/admin/plugins.html @@ -20,6 +20,9 @@

Etherpad Lite

+ + Technical information on installed plugins +

Installed plugins