diff options
author | johnyma22 <john@mclear.co.uk> | 2012-11-02 15:21:12 +0000 |
---|---|---|
committer | johnyma22 <john@mclear.co.uk> | 2012-11-02 15:21:12 +0000 |
commit | 2f123970e646e012a0be58387b963f79cdf977a0 (patch) | |
tree | f9bd4bfb0d45869f6061a0acf459eda427f3307e | |
parent | 1d055f2cd498b3f22a98e02871a82d1950f71369 (diff) | |
download | etherpad-lite-2f123970e646e012a0be58387b963f79cdf977a0.zip |
Make express restart - I think this reloads settings
-rw-r--r-- | src/node/hooks/express/adminsettings.js | 18 | ||||
-rw-r--r-- | src/static/js/admin/settings.js | 2 |
2 files changed, 6 insertions, 14 deletions
diff --git a/src/node/hooks/express/adminsettings.js b/src/node/hooks/express/adminsettings.js index 2a6b590d..db4df750 100644 --- a/src/node/hooks/express/adminsettings.js +++ b/src/node/hooks/express/adminsettings.js @@ -1,6 +1,7 @@ var path = require('path'); var eejs = require('ep_etherpad-lite/node/eejs'); var installer = require('ep_etherpad-lite/static/js/pluginfw/installer'); +var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks"); var fs = require('fs'); exports.expressCreateServer = function (hook_name, args, cb) { @@ -41,20 +42,11 @@ exports.socketio = function (hook_name, args, cb) { }); }); -/* - socket.on("install", function (plugin_name) { - socket.emit("progress", {progress:0, message:'Downloading and installing ' + plugin_name + "..."}); - installer.install(plugin_name, function (progress) { - socket.emit("progress", progress); - }); - }); + socket.on("restartServer", function () { + console.log("Admin request to restart server through a socket on /admin/settings"); + hooks.aCallAll("restartServer", {}, function () {}); - socket.on("uninstall", function (plugin_name) { - socket.emit("progress", {progress:0, message:'Uninstalling ' + plugin_name + "..."}); - installer.uninstall(plugin_name, function (progress) { - socket.emit("progress", progress); - }); }); -*/ + }); } diff --git a/src/static/js/admin/settings.js b/src/static/js/admin/settings.js index 5be25d87..0c9edb1a 100644 --- a/src/static/js/admin/settings.js +++ b/src/static/js/admin/settings.js @@ -38,7 +38,7 @@ $(document).ready(function () { /* Tell Etherpad Server to restart */ $('#restartEtherpad').on('click', function(){ - socket.emit("restartEtherpad"); + socket.emit("restartServer"); }); socket.on('saveprogress', function(progress){ |