2017-01-17 21:53:35 +01:00
|
|
|
<div class="container" style="margin:20px auto;max-width:500px;">
|
|
|
|
<center>
|
|
|
|
<img src="img/hyperion/hyperionlogo.png" alt="Redefine ambient light!">
|
|
|
|
<div>
|
|
|
|
<h3 data-i18n="info_restart_title"></h3>
|
|
|
|
<h4 data-i18n="info_restart_rightback"></h4>
|
|
|
|
<p data-i18n="info_restart_contus"></p>
|
|
|
|
<a href="https://forum.hyperion-project.org?pk_campaign=WebUI&pk_kwd=failedrestart" data-i18n="info_restart_contusa"></a>
|
|
|
|
</div>
|
|
|
|
</center>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ************************************ -->
|
|
|
|
|
|
|
|
<script>
|
|
|
|
performTranslation();
|
|
|
|
var connectionLost = false;
|
|
|
|
var connectionTimer;
|
2017-02-28 17:53:41 +01:00
|
|
|
var count = 1;
|
2017-01-17 21:53:35 +01:00
|
|
|
|
|
|
|
function tryReconnect()
|
|
|
|
{
|
2017-02-28 17:53:41 +01:00
|
|
|
if(count > 25)
|
|
|
|
window.clearInterval(connectionTimer);
|
|
|
|
|
2017-01-17 21:53:35 +01: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++;
|
2017-01-17 21:53:35 +01:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function restartAction()
|
|
|
|
{
|
2017-02-28 17:53:41 +01:00
|
|
|
if(!connectionLost)
|
|
|
|
{
|
|
|
|
window.clearInterval(cronId);
|
|
|
|
connectionLost = true;
|
|
|
|
connectionTimer = window.setInterval(tryReconnect, 1000);
|
|
|
|
}
|
2017-01-17 21:53:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|