mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
json-rpc - origin, ui update (#407)
* try ace * . * update * ... * update * update * test * - * update * fix * . * Revert "." This reverts commit631c30f8c0
. * Revert "fix" This reverts commitbe3dbc9cbd
. * Revert "update" This reverts commit50fc89e800
. * Revert "-" This reverts commit8a6c1fdab3
. * Revert "test" This reverts commit50b3641490
. * update schema * update ui * flags * adjustments
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
libh += '<a href="'+libs[key]+'" target="_blank">'+key+'</a>, ';
|
||||
libh += "<br/>"+$.i18n("about_credits");
|
||||
|
||||
lang = lang.toString().replace(",",", ");
|
||||
lang = lang.toString().replace(/,/g,", ");
|
||||
|
||||
var fc = [$.i18n("about_version"),$.i18n("about_build"),$.i18n("about_builddate"),$.i18n("about_translations"),$.i18n("about_resources", $.i18n("general_webui_title"))];
|
||||
var sc = [currentVersion,si.build,si.time,'('+availLang.length+')<p>'+lang+'</p><p><a href="#" target="_blank">'+$.i18n("about_contribute")+'</a></p>',libh];
|
||||
|
@@ -268,7 +268,7 @@
|
||||
<div id="collapse4" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<p data-i18n="conf_leds_layout_textf1">This textfield shows by default your current loaded layout and will be overwritten if you generate a new one above. Optional you could perform further edits.</p>
|
||||
<textarea rows="25" id="ledconfig" class="form-control"></textarea>
|
||||
<div id="aceedit" style="width:100%;height:500px"></div>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<button type="button" class="btn btn-warning" id="leds_custom_updsim"><i class="fa fa-search fa-fw"></i><span data-i18n="conf_leds_layout_button_updsim">Update preview</span></button>
|
||||
|
@@ -1,22 +1,22 @@
|
||||
|
||||
<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" style="font-size:50px"></i>
|
||||
<h4 data-i18n="info_conlost_label_autorefresh">This page will be automatically refreshed.</h4>
|
||||
<h4 data-i18n="info_conlost_label_autorecon">We reconnect again after Hyperion is available.</h4>
|
||||
<a href="/" data-i18n="info_conlost_label_reload">If not, click me or reload the page</a>
|
||||
</div>
|
||||
</center>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
|
||||
<!-- ************************************ -->
|
||||
@@ -25,19 +25,36 @@
|
||||
performTranslation();
|
||||
var connectionLost = false;
|
||||
var connectionTimer;
|
||||
var count = 1;
|
||||
|
||||
function tryReconnect()
|
||||
{
|
||||
if(count > 100)
|
||||
{
|
||||
window.clearInterval(connectionTimer);
|
||||
$('.reconstop').toggle();
|
||||
}
|
||||
|
||||
$('#counter').html(count+'/100');
|
||||
|
||||
$.ajax({ url: "/" }).done(function(data) {
|
||||
window.clearInterval(connectionTimer);
|
||||
window.location.href ="/";
|
||||
})
|
||||
.fail( function( jqXHR, textStatus ) {
|
||||
count++;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function connectionLostAction()
|
||||
{
|
||||
connectionLost = true;
|
||||
connectionTimer = window.setInterval(tryReconnect, 4000);
|
||||
if(!connectionLost)
|
||||
{
|
||||
window.clearInterval(cronId);
|
||||
connectionLost = true;
|
||||
connectionTimer = window.setInterval(tryReconnect, 4000);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@@ -14,20 +14,28 @@
|
||||
<table class="table borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td data-i18n="dashboard_infobox_label_currenthyp">Hyperion version:</td>
|
||||
<td id="currentversion">unknown</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-i18n="dashboard_infobox_label_latesthyp">Latest version:</td>
|
||||
<td id="latestversion">unknown</td>
|
||||
<td data-i18n="dashboard_infobox_label_platform">Platform:</td>
|
||||
<td id="dash_platform"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-i18n="conf_leds_contr_label_contrtype">LED type:</td>
|
||||
<td id="dash_leddevice">unknown</td>
|
||||
<td id="dash_leddevice"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-i18n="dashboard_infobox_label_device">Device:</td>
|
||||
<td id="dash_systeminfo"></td>
|
||||
<td data-i18n="dashboard_infobox_label_instance">Instance</td>
|
||||
<td id="dash_instance"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-i18n="dashboard_infobox_label_ports">Ports</td>
|
||||
<td id="dash_ports"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-i18n="dashboard_infobox_label_currenthyp">Hyperion version:</td>
|
||||
<td id="dash_currv">unknown</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-i18n="dashboard_infobox_label_latesthyp">Latest version:</td>
|
||||
<td id="dash_latev">unknown</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -60,10 +68,11 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-newspaper-o fa-fw"></i>
|
||||
<span data-i18n="dashboard_newsbox_label_title">Latest blog posts</span>
|
||||
<span data-i18n="dashboard_newsbox_label_title">Visit Hyperion Blog</span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<div id="dash_news" style="margin-bottom:7px"></div>
|
||||
<a href="https://hyperion-project.org/blog/?pk_campaign=WebUI&pk_kwd=visitblog" target="_blank" data-i18n="dashboard_newsbox_visitblog"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -40,16 +40,27 @@
|
||||
<table class="table borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align:middle"><label data-i18n="remote_color_label_color"></label></td>
|
||||
<td style="vertical-align:middle"><label for="cpeff" data-i18n="remote_color_label_color"></label></td>
|
||||
<td><div id="cp2" class="colorpicker-component input-group">
|
||||
<input type="text" class="form-control"/><span class="input-group-addon"><i></i></span>
|
||||
<input type="text" id="cpeff" class="form-control"/><span class="input-group-addon"><i></i></span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:middle"><label data-i18n="remote_effects_label_effects">Effect:</label></td>
|
||||
<td style="vertical-align:middle"><label for="effect_select" data-i18n="remote_effects_label_effects">Effect:</label></td>
|
||||
<td><select id="effect_select" class="form-control"></select></td>
|
||||
</tr>
|
||||
<tr style="display:none">
|
||||
<td style="vertical-align:middle"><label for="remote_input_img" >Picture:</label></td>
|
||||
<td><input id="remote_input_img" type="file" accept="image/*" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:middle"><label for="remote_duration" data-i18n="remote_input_duration"></label></td>
|
||||
<td class="input-group">
|
||||
<input id="remote_duration" type="number" class="form-control" value="0" min="0"/>
|
||||
<span class="input-group-addon" data-i18n="edt_append_s"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button data-i18n="remote_color_button_reset" type="button" class="btn btn-warning" id="reset_color" style="margin-top:10px;">Reset Color/Effect</button>
|
||||
|
@@ -17,19 +17,30 @@
|
||||
performTranslation();
|
||||
var connectionLost = false;
|
||||
var connectionTimer;
|
||||
var count = 1;
|
||||
|
||||
function tryReconnect()
|
||||
{
|
||||
if(count > 25)
|
||||
window.clearInterval(connectionTimer);
|
||||
|
||||
$.ajax({ url: "/" }).done(function(data) {
|
||||
window.clearInterval(connectionTimer);
|
||||
window.location.href ="/";
|
||||
})
|
||||
.fail( function( jqXHR, textStatus ) {
|
||||
count++;
|
||||
});
|
||||
}
|
||||
|
||||
function restartAction()
|
||||
{
|
||||
connectionLost = true;
|
||||
connectionTimer = window.setInterval(tryReconnect, 1000);
|
||||
if(!connectionLost)
|
||||
{
|
||||
window.clearInterval(cronId);
|
||||
connectionLost = true;
|
||||
connectionTimer = window.setInterval(tryReconnect, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@@ -118,7 +118,5 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
performTranslation();
|
||||
|
||||
if(showOptHelp)
|
||||
createHintH("intro", $.i18n('support_label_intro'), "supp_intro");
|
||||
createHintH("intro", $.i18n('support_label_intro'), "supp_intro");
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user