From: Calin Crisan Date: Sun, 6 Jul 2014 13:35:37 +0000 (+0300) Subject: added a friendly message when updating X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=0985cb12b8748b4a6201ac9a9860df23abca6c9f;p=motioneye-debian added a friendly message when updating --- diff --git a/static/css/ui.css b/static/css/ui.css index 0f665c4..b0b555f 100644 --- a/static/css/ui.css +++ b/static/css/ui.css @@ -359,6 +359,7 @@ div.modal-progress { background-image: url(../img/modal-progress.gif); width: 64px; height: 64px; + margin: auto; } td.dialog-item-label { diff --git a/static/js/main.js b/static/js/main.js index bae940c..1f0b87b 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -991,7 +991,7 @@ function doApply() { if (data.reboot) { var count = 0; - function checkServer() { + function checkServerReboot() { $.ajax({ type: 'GET', url: '/config/0/get/', @@ -1001,7 +1001,7 @@ function doApply() { error: function () { if (count < 25) { count += 1; - setTimeout(checkServer, 2000); + setTimeout(checkServerReboot, 2000); } else { window.location.reload(true); @@ -1010,7 +1010,7 @@ function doApply() { }); } - setTimeout(checkServer, 15000); + setTimeout(checkServerReboot, 15000); return; } @@ -1082,11 +1082,11 @@ function doUpdate() { } else { runConfirmDialog('New version available: ' + data.update_version + '. Update?', function () { - showModalDialog(''); + showModalDialog('
This may take a few minutes.
'); ajax('POST', '/update/?version=' + data.update_version, null, function (result) { if (result) { var count = 0; - function checkServer() { + function checkServerUpdate() { $.ajax({ type: 'GET', url: '/config/0/get/', @@ -1098,7 +1098,7 @@ function doUpdate() { error: function () { if (count < 25) { count += 1; - setTimeout(checkServer, 2000); + setTimeout(checkServerUpdate, 2000); } else { window.location.reload(true); @@ -1107,7 +1107,7 @@ function doUpdate() { }); } - setTimeout(checkServer, 15000); + setTimeout(checkServerUpdate, 10000); } else { runAlertDialog('Update failed!', function () {