1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-23 22:55:23 +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>
backgroundJobRunning = false;
window.setInterval(function get_status() {
var status = {{ status }};
$.getJSON('{% url 'inst_status' compute_id vname %}', function (data) {
if (data['status'] != status) {
if (data['status'] != status && !backgroundJobRunning) {
window.location.reload()
}
})
});
}, 5000);
</script>
<script>

View file

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