1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +00:00

disable page reloading while migrating vm and pleaseWaitDialog is displayed

fixes: http redirect after migrate does not jump to new compute node
This commit is contained in:
Ing. Jan KRCMAR 2017-03-09 15:14:38 +01:00
parent b5f9f638f1
commit 609651d707
2 changed files with 5 additions and 2 deletions

View file

@ -1290,13 +1290,14 @@
}); });
</script> </script>
<script> <script>
backgroundJobRunning = false;
window.setInterval(function get_status() { window.setInterval(function get_status() {
var status = {{ status }}; var status = {{ status }};
$.getJSON('{% url 'inst_status' compute_id vname %}', function (data) { $.getJSON('{% url 'inst_status' compute_id vname %}', function (data) {
if (data['status'] != status) { if (data['status'] != status && !backgroundJobRunning) {
window.location.reload() window.location.reload()
} }
}) });
}, 5000); }, 5000);
</script> </script>
<script> <script>

View file

@ -18,8 +18,10 @@
<script> <script>
function showPleaseWaitDialog() { function showPleaseWaitDialog() {
$('#pleaseWaitDialog').modal(); $('#pleaseWaitDialog').modal();
backgroundJobRunning = true;
} }
function hidePleaseWaitDialog() { function hidePleaseWaitDialog() {
$('#pleaseWaitDialog').modal('hide'); $('#pleaseWaitDialog').modal('hide');
backgroundJobRunning = false;
} }
</script> </script>