2017-02-28 17:53:41 +01:00
|
|
|
<div class="container" style="margin:20px auto;max-width:600px;">
|
|
|
|
<center>
|
|
|
|
<img src="img/hyperion/hyperionlostconnection.png" alt="Redefine ambient light!">
|
|
|
|
<div>
|
|
|
|
<h2 data-i18n="info_conlost_label_title">Lost connection to Hyperion service!</h2>
|
|
|
|
<hr>
|
|
|
|
<h4 data-i18n="info_conlost_label_reason">Possible reasons:</h4>
|
|
|
|
<p data-i18n="info_conlost_label_reason1">- Hyperion restarts</p>
|
|
|
|
<p data-i18n="info_conlost_label_reason2">- You perform an update</p>
|
|
|
|
<p data-i18n="info_conlost_label_reason3">- Hyperion isn't running</p>
|
|
|
|
<hr>
|
|
|
|
<i class="fa fa-refresh fa-spin reconstop" style="font-size:50px"></i>
|
|
|
|
<h4 class="reconstop" data-i18n="info_conlost_label_autorefresh">This page will be automatically refreshed.</h4>
|
|
|
|
<h4 class="reconstop" data-i18n="info_conlost_label_autorecon">We reconnect again after Hyperion is available.</h4>
|
|
|
|
<span id="counter" class="reconstop"></span>
|
|
|
|
<a class="reconstop" style="display:none" href="/" data-i18n="info_conlost_label_reload"></a>
|
|
|
|
</div>
|
|
|
|
</center>
|
|
|
|
</div>
|
2016-09-06 10:14:54 +02:00
|
|
|
|
2016-09-07 20:10:37 +02:00
|
|
|
|
|
|
|
<!-- ************************************ -->
|
|
|
|
|
2016-09-06 10:14:54 +02:00
|
|
|
<script>
|
2016-12-04 19:32:23 +01:00
|
|
|
performTranslation();
|
2016-09-07 20:10:37 +02:00
|
|
|
var connectionLost = false;
|
|
|
|
var connectionTimer;
|
2017-02-28 17:53:41 +01:00
|
|
|
var count = 1;
|
2016-09-07 20:10:37 +02:00
|
|
|
|
|
|
|
function tryReconnect()
|
|
|
|
{
|
2017-02-28 17:53:41 +01:00
|
|
|
if(count > 100)
|
|
|
|
{
|
|
|
|
window.clearInterval(connectionTimer);
|
|
|
|
$('.reconstop').toggle();
|
|
|
|
}
|
|
|
|
|
|
|
|
$('#counter').html(count+'/100');
|
|
|
|
|
2016-09-07 20:10:37 +02:00
|
|
|
$.ajax({ url: "/" }).done(function(data) {
|
|
|
|
window.clearInterval(connectionTimer);
|
|
|
|
window.location.href ="/";
|
2017-02-28 17:53:41 +01:00
|
|
|
})
|
|
|
|
.fail( function( jqXHR, textStatus ) {
|
|
|
|
count++;
|
2016-09-07 20:10:37 +02:00
|
|
|
});
|
2017-02-28 17:53:41 +01:00
|
|
|
|
2016-09-07 20:10:37 +02:00
|
|
|
}
|
|
|
|
|
2016-09-06 10:14:54 +02:00
|
|
|
function connectionLostAction()
|
|
|
|
{
|
2017-02-28 17:53:41 +01:00
|
|
|
if(!connectionLost)
|
|
|
|
{
|
|
|
|
window.clearInterval(cronId);
|
|
|
|
connectionLost = true;
|
|
|
|
connectionTimer = window.setInterval(tryReconnect, 4000);
|
|
|
|
}
|
2016-09-06 10:14:54 +02:00
|
|
|
}
|
2016-09-07 20:10:37 +02:00
|
|
|
|
2016-09-06 10:14:54 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|