mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Webui: extend led hardware config + connection lost page (#226)
* split content and js tune leds config * implement connection lost page * split js/html in huebridge * add js action for connection lost * extend led config make connection loss nicer * tune led code add menu entry for grabber * more tuning of webui * switch back to botstrap textarea add v4l to components * add icon * extend schema for jsoneditor * implement ledcolors streaming with 4fps * implement component state
This commit is contained in:
@@ -1,16 +1,39 @@
|
||||
<div id="wrapper">
|
||||
<div class="container-fluid">
|
||||
connection lost: <a href="/">reconnect</a>
|
||||
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom:0">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="/"><img src="img/hyperion/hyperionlogo.png" alt="Redefine ambient light!" height="55"></a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container" style="margin-top:50px">
|
||||
<div class="panel panel-danger" style="box-shadow: 10px 10px 5px #BBBBBB;">
|
||||
<div class="panel-heading"><i class="fa fa-exclamation-triangle"></i> Connection to Hyperion Service lost!</div>
|
||||
<div class="panel-body"><a href="/">reconnect</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- ************************************ -->
|
||||
|
||||
<script>
|
||||
var connectionLost = false;
|
||||
var connectionTimer;
|
||||
|
||||
function tryReconnect()
|
||||
{
|
||||
$.ajax({ url: "/" }).done(function(data) {
|
||||
window.clearInterval(connectionTimer);
|
||||
window.location.href ="/";
|
||||
});
|
||||
}
|
||||
|
||||
function connectionLostAction()
|
||||
{
|
||||
// demo code to see if this works
|
||||
$("#wrapper").css("margin","auto");
|
||||
$("#wrapper").css("background-color","#BBBBBB");
|
||||
connectionLost = true;
|
||||
connectionTimer = window.setInterval(tryReconnect, 5000);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user