You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$('#pw_resp').attr('class', 'alert alert-danger').html('Unable to load initial server log.').fadeIn().delay(5000).fadeOut();
187
+
alert('Unable to load initial server log, try reloading the page.');
187
188
});
188
189
} else {
189
-
$('#live_console').val('');
190
+
$('#live_console').val('Server is currently off.');
190
191
}
191
192
updateServerPowerControls(data.status);
192
193
updatePlayerListVisibility(data.status);
@@ -225,7 +226,7 @@
225
226
var cpuChart =newChart(cty).Bar(cpuChartData,{animation:!1,showScale:!0,barShowStroke:!1,scaleOverride:!1,tooltipTemplate:"<%= value %> %",barValueSpacing:1,barStrokeWidth:1,scaleShowGridLines:!1});
226
227
functionupdatePlayerListVisibility(data) {
227
228
// Server is On or Starting
228
-
if(data ==1|| data ==3) {
229
+
if(data !==0) {
229
230
$('#stats_players').show();
230
231
} else {
231
232
$('#stats_players').hide();
@@ -248,9 +249,10 @@ function updatePlayerListVisibility(data) {
var killConfirm =confirm('WARNING: This operation will not save your server data gracefully. You should only use this if your server is failing to respond to stops.');
285
+
$('[data-attr="power"]').click(function (event) {
286
+
event.preventDefault();
287
+
var action =$(this).data('action');
288
+
if (action ==='kill') {
289
+
var killConfirm =confirm('WARNING: This operation will not save your server data gracefully. You should only use this if your server is failing to respond to normal stop commands.');
$('#pw_resp').attr('class', 'alert alert-danger').html('Unable to process your request. Please try again. ('+ errorThrown +')').fadeIn().delay(5000).fadeOut();
309
+
$('#pw_resp').attr('class', 'alert alert-success').html('Server has been '+ action +'ed successfully.').fadeIn().delay(5000).fadeOut();
310
+
}).fail(function(jqXHR) {
311
+
var error ='An unknown error occured processing this request.';
312
+
if (typeofjqXHR.responseJSON.error!=='undefined') {
313
+
error =jqXHR.responseJSON.error;
314
+
}
315
+
$('#pw_resp').attr('class', 'alert alert-danger').html('Unable to process your request. Please try again. ('+ error +')').fadeIn().delay(5000).fadeOut();
$('#pw_resp').attr('class', 'alert alert-danger').html('Unable to process your request. Please try again. ('+ errorThrown +')').fadeIn().delay(5000).fadeOut();
$('#pw_resp').attr('class', 'alert alert-danger').html('Unable to process your request. Please try again. ('+ errorThrown +')').fadeIn().delay(5000).fadeOut();
$('#pw_resp').attr('class', 'alert alert-danger').html('Unable to process your request. Please try again. ('+ errorThrown +')').fadeIn().delay(5000).fadeOut();
0 commit comments