mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
@@ -19,8 +19,8 @@ dashboardController.get = function(req, res, next) {
|
||||
var notices = [
|
||||
{
|
||||
done: !meta.reloadRequired,
|
||||
doneText: 'Reload not required',
|
||||
notDoneText:'Reload required'
|
||||
doneText: 'Restart not required',
|
||||
notDoneText:'Restart required'
|
||||
},
|
||||
{
|
||||
done: plugins.hasListeners('filter:search.query'),
|
||||
|
||||
46
src/meta.js
46
src/meta.js
@@ -41,50 +41,14 @@ var async = require('async'),
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Reload deprecated as of v1.1.2+, remove in v2.x
|
||||
*/
|
||||
Meta.reload = function(callback) {
|
||||
pubsub.publish('meta:reload', {hostname: os.hostname()});
|
||||
reload(callback);
|
||||
restart();
|
||||
callback();
|
||||
};
|
||||
|
||||
pubsub.on('meta:reload', function(data) {
|
||||
if (data.hostname !== os.hostname()) {
|
||||
reload();
|
||||
}
|
||||
});
|
||||
|
||||
function reload(callback) {
|
||||
callback = callback || function() {};
|
||||
|
||||
var plugins = require('./plugins');
|
||||
async.series([
|
||||
function (next) {
|
||||
plugins.fireHook('static:app.reload', {}, next);
|
||||
},
|
||||
async.apply(plugins.clearRequireCache),
|
||||
async.apply(Meta.css.minify),
|
||||
async.apply(Meta.js.minify, 'nodebb.min.js'),
|
||||
async.apply(Meta.js.minify, 'acp.min.js'),
|
||||
async.apply(Meta.sounds.init),
|
||||
async.apply(languages.init),
|
||||
async.apply(Meta.templates.compile),
|
||||
async.apply(plugins.reload),
|
||||
async.apply(plugins.reloadRoutes),
|
||||
async.apply(auth.reloadRoutes),
|
||||
function(next) {
|
||||
Meta.config['cache-buster'] = utils.generateUUID();
|
||||
templates.flush();
|
||||
next();
|
||||
}
|
||||
], function(err) {
|
||||
if (!err) {
|
||||
emitter.emit('nodebb:ready');
|
||||
}
|
||||
Meta.reloadRequired = false;
|
||||
|
||||
callback(err);
|
||||
});
|
||||
}
|
||||
|
||||
Meta.restart = function() {
|
||||
pubsub.publish('meta:restart', {hostname: os.hostname()});
|
||||
restart();
|
||||
|
||||
@@ -161,6 +161,4 @@ module.exports = function(Meta) {
|
||||
nconf.set('theme_templates_path', themePath);
|
||||
nconf.set('theme_config', path.join(nconf.get('themes_path'), themeObj.id, 'theme.json'));
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
@@ -49,21 +49,10 @@ SocketAdmin.before = function(socket, method, data, next) {
|
||||
});
|
||||
};
|
||||
|
||||
SocketAdmin.reload = function(socket, data, callback) {
|
||||
events.log({
|
||||
type: 'reload',
|
||||
uid: socket.uid,
|
||||
ip: socket.ip
|
||||
});
|
||||
if (process.send) {
|
||||
process.send({
|
||||
action: 'reload'
|
||||
});
|
||||
callback();
|
||||
} else {
|
||||
meta.reload(callback);
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Reload deprecated as of v1.1.2+, remove in v2.x
|
||||
*/
|
||||
SocketAdmin.reload = SocketAdmin.restart;
|
||||
|
||||
SocketAdmin.restart = function(socket, data, callback) {
|
||||
events.log({
|
||||
|
||||
@@ -95,11 +95,10 @@
|
||||
<div class="panel-heading">System Control</div>
|
||||
<div class="panel-body text-center">
|
||||
<p>
|
||||
<button class="btn btn-warning reload" data-placement="bottom" data-toggle="tooltip" title="Reload NodeBB to activate new plugins">Reload</button>
|
||||
<button class="btn btn-danger restart" data-placement="bottom" data-toggle="tooltip" title="Restarting NodeBB will drop all existing connections for a few seconds">Restart</button>
|
||||
<button class="btn btn-danger btn-block restart" data-placement="bottom" data-toggle="tooltip" title="Restarting NodeBB will drop all existing connections for a few seconds">Restart</button>
|
||||
</p>
|
||||
<p>
|
||||
<a href="{config.relative_path}/admin/settings/advanced" class="btn btn-info" data-placement="bottom" data-toggle="tooltip" title="Click here to set up maintenance mode for NodeBB">Maintenance Mode</a>
|
||||
<a href="{config.relative_path}/admin/settings/advanced" class="btn btn-info btn-block" data-placement="bottom" data-toggle="tooltip" title="Click here to set up maintenance mode for NodeBB">Maintenance Mode</a>
|
||||
</p>
|
||||
|
||||
<hr />
|
||||
|
||||
@@ -121,11 +121,6 @@
|
||||
<i class="fa fa-fw fa-ellipsis-v"></i>
|
||||
</a>
|
||||
<ul id="user-control-list" class="dropdown-menu" aria-labelledby="user_dropdown">
|
||||
<li>
|
||||
<a href="#" class="reload" title="Reload Forum">
|
||||
Reload Forum
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="restart" title="Restart Forum">
|
||||
Restart Forum
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<input class="form-control" id="eventLoopLagThreshold" type="number" data-field="eventLoopLagThreshold" placeholder="Default: 70" step="10" min="10" value="70" />
|
||||
<p class="help-block">
|
||||
Lowering this value decreases wait times for page loads, but will also show the
|
||||
"excessive load" message to more users. (Reload required)
|
||||
"excessive load" message to more users. (Restart required)
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -96,7 +96,7 @@
|
||||
<input class="form-control" id="eventLoopInterval" type="number" data-field="eventLoopInterval" placeholder="Default: 500" value="500" step="50" />
|
||||
<p class="help-block">
|
||||
Lowering this value causes NodeBB to become more sensitive to spikes in load, but
|
||||
may also cause the check to become too sensitive. (Reload required)
|
||||
may also cause the check to become too sensitive. (Restart required)
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user