|
|
@ -157,26 +157,25 @@ require('../../scripts-admin');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function setupRestartLinks() {
|
|
|
|
function setupRestartLinks() {
|
|
|
|
$('.rebuild-and-restart').off('click').on('click', function () {
|
|
|
|
require(['benchpress', 'bootbox', 'admin/modules/instance'], function (benchpress, bootbox, instance) {
|
|
|
|
require(['bootbox'], function (bootbox) {
|
|
|
|
// need to preload the compiled alert template
|
|
|
|
bootbox.confirm('[[admin/admin:alert.confirm-rebuild-and-restart]]', function (confirm) {
|
|
|
|
// otherwise it can be unloaded when rebuild & restart is run
|
|
|
|
if (confirm) {
|
|
|
|
// the client can't fetch the template file, resulting in an error
|
|
|
|
require(['admin/modules/instance'], function (instance) {
|
|
|
|
benchpress.render('alert', {}).then(function () {
|
|
|
|
|
|
|
|
$('.rebuild-and-restart').off('click').on('click', function () {
|
|
|
|
|
|
|
|
bootbox.confirm('[[admin/admin:alert.confirm-rebuild-and-restart]]', function (confirm) {
|
|
|
|
|
|
|
|
if (confirm) {
|
|
|
|
instance.rebuildAndRestart();
|
|
|
|
instance.rebuildAndRestart();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('.restart').off('click').on('click', function () {
|
|
|
|
$('.restart').off('click').on('click', function () {
|
|
|
|
require(['bootbox'], function (bootbox) {
|
|
|
|
bootbox.confirm('[[admin/admin:alert.confirm-restart]]', function (confirm) {
|
|
|
|
bootbox.confirm('[[admin/admin:alert.confirm-restart]]', function (confirm) {
|
|
|
|
if (confirm) {
|
|
|
|
if (confirm) {
|
|
|
|
|
|
|
|
require(['admin/modules/instance'], function (instance) {
|
|
|
|
|
|
|
|
instance.restart();
|
|
|
|
instance.restart();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|