hyperion.ng/assets/webconfig/content/connection_lost.html

47 lines
1.1 KiB
HTML

<div id="wrapper">
<div class="container" style="margin:20px auto;max-width:600px;">
<center>
<img src="img/hyperion/hyperionlostconnection.png" alt="Redefine ambient light!">
<div>
<h2>Lost connection to Hyperion service!<h1>
<hr>
<h4>Possible reasons:</h4>
<p>1. Hyperion restarts</p>
<p>2. You perform an update</p>
<p>3. An older browser session</p>
<p>3. Hyperion isn't running</p>
<hr>
<i class="fa fa-refresh fa-spin" style="font-size:50px"></i>
<h4>This page will be automatically refreshed.</h4>
<h4>We reconnect again after Hyperion is available.</h4>
<a href="/">If not, click me</a>
</div>
</center>
</div>
</div>
<!-- ************************************ -->
<script>
var connectionLost = false;
var connectionTimer;
function tryReconnect()
{
$.ajax({ url: "/" }).done(function(data) {
window.clearInterval(connectionTimer);
window.location.href ="/";
});
}
function connectionLostAction()
{
connectionLost = true;
connectionTimer = window.setInterval(tryReconnect, 5000);
}
</script>