More plugin information
parent
3e44b0e0d5
commit
cf2f0b72a3
|
@ -16,6 +16,11 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
"ep_etherpad-lite/templates/admin/plugins.html",
|
"ep_etherpad-lite/templates/admin/plugins.html",
|
||||||
render_args), {});
|
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) {
|
exports.socketio = function (hook_name, args, cb) {
|
||||||
|
|
|
@ -41,14 +41,16 @@ exports.formatParts = function () {
|
||||||
return _.map(exports.parts, function (part) { return part.full_name; }).join("\n");
|
return _.map(exports.parts, function (part) { return part.full_name; }).join("\n");
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.formatHooks = function () {
|
exports.formatHooks = function (hook_set_name) {
|
||||||
var res = [];
|
var res = [];
|
||||||
_.chain(exports.hooks).keys().forEach(function (hook_name) {
|
var hooks = exports.extractHooks(exports.parts, hook_set_name || "hooks");
|
||||||
_.forEach(exports.hooks[hook_name], function (hook) {
|
|
||||||
res.push(hook.hook_name + ": " + hook.hook_fn_name + " from " + hook.part.full_name);
|
_.chain(hooks).keys().forEach(function (hook_name) {
|
||||||
|
_.forEach(hooks[hook_name], function (hook) {
|
||||||
|
res.push("<dt>" + hook.hook_name + "</dt><dd>" + hook.hook_fn_name + " from " + hook.part.full_name + "</dd>");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return res.join("\n");
|
return "<dl>" + res.join("\n") + "</dl>";
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.loadFn = function (path, hookName) {
|
exports.loadFn = function (path, hookName) {
|
||||||
|
@ -62,7 +64,7 @@ exports.loadFn = function (path, hookName) {
|
||||||
return fn;
|
return fn;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.extractHooks = function (parts, hook_set_name, plugins) {
|
exports.extractHooks = function (parts, hook_set_name) {
|
||||||
var hooks = {};
|
var hooks = {};
|
||||||
_.each(parts,function (part) {
|
_.each(parts,function (part) {
|
||||||
_.chain(part[hook_set_name] || {})
|
_.chain(part[hook_set_name] || {})
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
|
|
||||||
|
|
||||||
<h1>Etherpad Lite</h1>
|
<h1>Etherpad Lite</h1>
|
||||||
|
|
||||||
|
<a href="/admin/plugins/info">Technical information on installed plugins</a>
|
||||||
|
|
||||||
<div class="separator"></div>
|
<div class="separator"></div>
|
||||||
<h2>Installed plugins</h2>
|
<h2>Installed plugins</h2>
|
||||||
<table>
|
<table>
|
||||||
|
|
Loading…
Reference in New Issue