@ -4,21 +4,20 @@
define ( 'admin/modules/instance' , function ( ) {
var instance = { } ;
instance . re load = function ( callback ) {
instance . re buildAndRestart = function ( callback ) {
app . alert ( {
alert _id : 'instance_re load ',
alert _id : 'instance_re build_and_restart ',
type : 'info' ,
title : 'Reloading... <i class="fa fa-spin fa-refresh"></i>' ,
message : 'NodeBB is reloading.' ,
timeout : 5000 ,
title : 'Rebuilding... <i class="fa fa-spin fa-refresh"></i>' ,
message : 'NodeBB is rebuilding front-end assets (css, javascript, etc).' ,
} ) ;
$ ( window ) . one ( 'action:reconnected' , function ( ) {
app . alert ( {
alert _id : 'instance_re load ',
alert _id : 'instance_re build_and_restart ',
type : 'success' ,
title : '<i class="fa fa-check"></i> Success' ,
message : 'NodeBB has re load ed successfully.',
message : 'NodeBB has re built and restart ed successfully.',
timeout : 5000 ,
} ) ;
@ -27,16 +26,22 @@ define('admin/modules/instance', function () {
}
} ) ;
socket . emit ( 'admin.reload' ) ;
socket . emit ( 'admin.reload' , function ( ) {
app . alert ( {
alert _id : 'instance_rebuild_and_restart' ,
type : 'info' ,
title : 'Build Complete!... <i class="fa fa-spin fa-refresh"></i>' ,
message : 'NodeBB is restarting.' ,
} ) ;
} ) ;
} ;
instance . restart = function ( callback ) {
app . alert ( {
alert _id : 'instance_restart' ,
type : 'info' ,
title : 'Rebuilding... <i class="fa fa-spin fa-refresh"></i>' ,
message : 'NodeBB is rebuilding front-end assets (css, javascript, etc).' ,
timeout : 10000 ,
title : 'Restarting... <i class="fa fa-spin fa-refresh"></i>' ,
message : 'NodeBB is restarting.' ,
} ) ;
$ ( window ) . one ( 'action:reconnected' , function ( ) {
@ -44,8 +49,8 @@ define('admin/modules/instance', function () {
alert _id : 'instance_restart' ,
type : 'success' ,
title : '<i class="fa fa-check"></i> Success' ,
message : 'NodeBB has successfully restarted .',
timeout : 10 000,
message : 'NodeBB has restarted successfully.',
timeout : 5 000,
} ) ;
if ( typeof callback === 'function' ) {
@ -53,15 +58,7 @@ define('admin/modules/instance', function () {
}
} ) ;
socket . emit ( 'admin.restart' , function ( ) {
app . alert ( {
alert _id : 'instance_restart' ,
type : 'info' ,
title : 'Build Complete!... <i class="fa fa-spin fa-refresh"></i>' ,
message : 'NodeBB is reloading.' ,
timeout : 10000 ,
} ) ;
} ) ;
socket . emit ( 'admin.restart' ) ;
} ;
return instance ;