Reports - final version (#418)

* remove device config at log

* ...

* update ui
This commit is contained in:
brindosch 2017-03-18 00:05:04 +01:00 committed by redPanther
parent a20e073bbd
commit 9a0e1daf7b
22 changed files with 128 additions and 66 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -9,8 +9,8 @@
<script type="text/javascript">
performTranslation();
var si = serverInfo.info.hyperion[0];
var si = sysInfo.hyperion;
var libs = {"Bootstrap 3" : "http://getbootstrap.com/", "JQuery" : "https://jquery.com/", "Bootstrap Colorpicker" : "https://itsjavi.com/bootstrap-colorpicker/", "JSON-Editor" : "http://jeremydorn.com/json-editor/", "jQuery.i18n" : "https://github.com/wikimedia/jquery.i18n", "metisMenu" : "http://mm.onokumus.com/index.html", "download.js" : "http://danml.com/download.html", "gijgo" : "http://gijgo.com/"};
var libh = "";
var lang = [];
@ -24,8 +24,7 @@
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];
var sc = [currentVersion,si.build,si.time,'('+availLang.length+')<p>'+lang+'</p><p><a href="https://hyperion-project.org/contribute/?pk_campaign=WebUI&pk_kwd=about_contribute" target="_blank">'+$.i18n("about_contribute")+'</a></p>',libh];
createTable("","atb","about_cont");
for(var i = 0; i<fc.length; i++)

View File

@ -6,6 +6,7 @@
<div class="row" id='conf_cont'></div>
<hr />
<div id="log_content"><span style="font-weight:bold;font-size:17px" data-i18n="conf_logging_nomessage"></span></div>
<div id="prev_reports"></div>
</div>
</div>
</div>

View File

@ -4,14 +4,14 @@
<h3 class="page-header"><i class="fa fa-info fa-fw"></i><span data-i18n="support_label_title">Support Hyperion</span></h3>
<div id="supp_intro"></div>
<h4 style="font-weight: bold" data-i18n="support_label_spreadtheword">Spread the word</h4>
<a href="#" target="_blank" class="unlink">
<a href="https://www.facebook.com/Hyperion-1415088231896140/" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-facebook bg-color-fb"></i>
<h4>Facebook</h4>
<p data-i18n="support_label_fbtext">Share our Hyperion Facebook page and get a notice when new updates are released</p>
</div>
</a>
<a href="#" target="_blank" class="unlink">
<a href="https://twitter.com/HyperionAmbient" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-twitter bg-color-tw"></i>
<h4>Twitter</h4>
@ -32,6 +32,13 @@
<p data-i18n="support_label_yttext">Bored from pictures? Checkout our Youtube channel!</p>
</div>
</a>
<a href="https://www.instagram.com/hyperionambient/" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-instagram bg-color-ig"></i>
<h4>Instagram</h4>
<p data-i18n="support_label_igtext"></p>
</div>
</a>
</div>
<div class="col-xs-12">
<hr>
@ -65,19 +72,18 @@
<li><a href="http://rover.ebay.com/rover/1/1185-53479-19255-0/1?pub=5575174930&toolid=10001&campid=1185-53479-19255-0&customid=&mpt=1016300&mpre=http%3A%2F%2Fwww.ebay.es" target="_blank" data-i18n="general_country_es">Spain</a></li>
</ul>
</div>
<a href="https://www.paypal.me/hyperionproject/10" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-paypal bg-color-pp"></i>
<h4>Paypal</h4>
<p data-i18n="support_label_donationpp">Donation:</p><a href="https://www.paypal.me/hyperionproject/10" target="_blank">Paypal</a>
</div>
</a>
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-btc bg-color-btc"></i>
<h4>Bitcoin</h4>
<p data-i18n="support_label_btctext">Address:</p>
<p>1GGZbsT6fH3cGq25H5HS2PfisPfDnffSJR</p>
<p style="word-break: break-all;">1GGZbsT6fH3cGq25H5HS2PfisPfDnffSJR</p>
</div>
</div>

View File

@ -13,6 +13,10 @@ body{
overflow-y: scroll;
}
.btn{margin: 2px 0;}
/* fixed brand icon */
@media (min-width: 768px){
.navbar-brand{position:fixed}
}
/*mobile nav*/
@media (max-width: 768px){
@ -123,6 +127,7 @@ table label{margin:0}
.support-container:hover .bg-color-btc{background-color:#f7931a; color:white;}
.support-container:hover .bg-color-pp{background-color:#0070ba; color:white;}
.support-container:hover .bg-color-am{background-color:#ef9c00; color:white;}
.support-container:hover .bg-color-ig{background-color:#ab3392; color:white;}
/*Config introduction*/
.introd h4{padding-left:14px;border-left:5px solid #0088cc;}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -165,6 +165,7 @@
"conf_logging_uploading" : "Aufbereitung der Daten...",
"conf_logging_yourlink" : "Link zu deinem Bericht",
"conf_logging_uplfailed" : "Hochladen fehlgeschlagen! Überprüfe deine Internetverbindung!",
"conf_logging_lastreports" : "Frühere Berichte",
"conf_webconfig_label_intro" : "Einstellungen zur Webkonfiguration. Änderungen können die Erreichbarkeit des Webinterfaces beeinflussen.",
"remote_losthint" : "Notiz: Alle Änderungen gehen nach einem Neustart verloren.",
"remote_color_label" : "Farbe/Effekt",
@ -175,7 +176,7 @@
"remote_adjustment_label" : "Farbanpassung",
"remote_adjustment_intro" : "Verändere live Farbe/Helligkeit/Linearisierung. $1",
"remote_input_label" : "Quellenauswahl",
"remote_input_intro" : "Hyperion nutzt ein Prioritätensystem um die Quelle zu wählen. Alles was du setzte hat eine Prioität (Effekte/Farben/Plattform Aufnahme/USB Aufnahme und Netzwerkquellen). Standardmäßig nutzt Hyperion die Quelle mit der niedrigsten Prioität. Hier kannst du aktiv Einfluss darauf nehmen. $1",
"remote_input_intro" : "Hyperion nutzt ein Prioritätensystem um die Quelle zu wählen. Alles was du setzt hat eine Priorität (Effekte/Farben/Plattform Aufnahme/USB Aufnahme und Netzwerkquellen). Standardmäßig nutzt Hyperion die Quelle mit der niedrigsten Priorität. Hier kannst du aktiv Einfluss darauf nehmen. $1",
"remote_input_label_autoselect" : "Automatische Auswahl",
"remote_input_setsource_btn" : "Wähle Quelle",
"remote_input_sourceactiv_btn" : "Quelle aktiv",
@ -203,12 +204,13 @@
"effectsconfigurator_label_deleffect" : "Effekt entfernen:",
"effectsconfigurator_button_deleffect" : "Effekt entfernen",
"support_label_title" : "Unterstütze Hyperion",
"support_label_intro" : "Hyperion ist ein kostenloses Open Source Projekt und ein kleines Team arbeitet an seiner Weiterentwicklung. Darum benötigen wir DEINE Unterstützung um den Ball weiter rollen zu lassen und um weiter in bessere Infrastruktur und Weiterentwicklung investieren zu können.",
"support_label_intro" : "Hyperion ist ein kostenloses Open Source Projekt und ein kleines Team arbeitet an seiner Weiterentwicklung. Darum benötigen wir DEINE Unterstützung um weiter in bessere Infrastruktur und Weiterentwicklung investieren zu können.",
"support_label_spreadtheword" : "Weitersagen!",
"support_label_fbtext" : "Teile Inhalte in Facebook und halte dich und andere auf dem Laufenden",
"support_label_twtext" : "Nutze die 140 Zeichen und bleibe auf dem Laufenden auch auf Twitter",
"support_label_ggtext" : "Platziere uns in deinen Kreisen auf Google+",
"support_label_yttext" : "Gelangweilt von Bildern? Werfe einen Blick auf unsere Youtube Videos",
"support_label_igtext" : "Schau doch mal bei Instagram vorbei!",
"support_label_donate" : "Spende oder nutze unsere Affiliate Links",
"support_label_affinstr1" : "Klicke auf den Link deines Landes",
"support_label_affinstr2" : "Kaufe wie gewohnt ein, abhängig von deinem Umsatz bekommen wir eine kleine Provision",
@ -468,6 +470,7 @@
"edt_conf_v4l2_cropBottom_title" : "Entferne unten",
"edt_conf_v4l2_cropBottom_expl" : "Anzahl der Pixel auf der unteren Seite die vom Bild entfernt werden.",
"edt_conf_v4l2_signalDetection_title" : "Signal Erkennung",
"edt_conf_v4l2_signalDetection_expl" : "Wenn aktiviert, wird die USB Aufnahme temporär bei \"kein Signal\" abgeschalten.",
"edt_conf_v4l2_redSignalThreshold_title" : "Rote Signalschwelle",
"edt_conf_v4l2_redSignalThreshold_expl" : "Verdunkelt rote Werte. (Wird als schwarz interpretiert)",
"edt_conf_v4l2_greenSignalThreshold_title" : "Grüne Signalschwelle",

View File

@ -165,6 +165,7 @@
"conf_logging_uploading" : "Prepare data...",
"conf_logging_yourlink" : "Link to your report",
"conf_logging_uplfailed" : "Upload failed! Please check your internet connection!",
"conf_logging_lastreports" : "Previous reports",
"conf_webconfig_label_intro" : "Webconfiguration settings. Edit wisely.",
"remote_losthint" : "Note: All changes are lost after a restart.",
"remote_color_label" : "Colors/Effects",
@ -209,6 +210,7 @@
"support_label_twtext" : "Share and follow on Twitter, be always up to date with latest post about the Hyperion development",
"support_label_ggtext" : "Circle us on Google +!",
"support_label_yttext" : "Bored from pictures? Checkout our Youtube channel!",
"support_label_igtext" : "Visit us on Instagram to watch the latest Hyperion pictures!",
"support_label_donate" : "Donate or use our affiliate links",
"support_label_affinstr1" : "Click on the appropriate link of your country",
"support_label_affinstr2" : "Everything you buy (doesn't matter what) we get a small fee based on your turnover",
@ -469,6 +471,7 @@
"edt_conf_v4l2_cropBottom_title" : "Crop bottom",
"edt_conf_v4l2_cropBottom_expl" : "Count of pixels on the bottom side that are removed from the picture.",
"edt_conf_v4l2_signalDetection_title" : "Enable signal detection",
"edt_conf_v4l2_signalDetection_expl" : "If enabled, usb capture will be temporarily disabled when no signal was found.",
"edt_conf_v4l2_redSignalThreshold_title" : "Red signal threshold",
"edt_conf_v4l2_redSignalThreshold_expl" : "Darkens low red values (recognized as black)",
"edt_conf_v4l2_greenSignalThreshold_title" : "Green signal threshold",

View File

@ -12,8 +12,12 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
<meta name="description" content="">
<meta name="description" content="Hyperion Web Configuration">
<meta name="msapplication-TileColor" content="#91989C">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<link rel="apple-touch-icon-precomposed" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" href="/favicon.png" sizes="32x32">
<title data-i18n="general_webui_title">Hyperion - Web Configuration</title>
<!-- jQuery -->
@ -190,7 +194,7 @@
</nav>
<!-- Page Content -->
<div id="page-wrapper" style="padding-top:10px">
<div id="page-wrapper" style="padding-top:10px; overflow: hidden;">
<div id="hyperion_reload_notify" class="alert alert-warning" style="display:none;padding:10px;margin:0">
<div class="panel-danger" style="text-align:right">
<div style="float:left;line-height:33px;" data-i18n="dashboard_alert_message_confedit">Your Hyperion configuration has been modified. To apply it, restart Hyperion.</div>

View File

@ -20,7 +20,7 @@ $(document).ready( function() {
title = d[i].title.rendered;
excerpt = d[i].excerpt.rendered;
link = d[i].link+'?pk_campaign=WebUI&pk_kwd=post_'+d[i].slug;
link = d[i].link+'?pk_campaign=WebUI&pk_kwd=news_'+d[i].slug;
newsCont(title,excerpt,link);
}
@ -50,7 +50,7 @@ $(document).ready( function() {
function updateComponents()
{
var components = serverInfo.info.components;
var components = serverInfo.components;
components_html = "";
for ( idx=0; idx<components.length;idx++)
{
@ -60,7 +60,7 @@ $(document).ready( function() {
}
// add more info
$('#dash_leddevice').html(serverInfo.info.ledDevices.active);
$('#dash_leddevice').html(serverInfo.ledDevices.active);
$('#dash_currv').html(currentVersion);
$('#dash_instance').html(serverConfig.general.name);
$('#dash_ports').html(jsonPort+' | '+serverConfig.protoServer.port);
@ -80,7 +80,7 @@ $(document).ready( function() {
});
//determine platform
var grabbers = serverInfo.info.grabbers.available;
var grabbers = serverInfo.grabbers.available;
var html = "";
if(grabbers.indexOf('dispmanx') > -1)
@ -105,4 +105,4 @@ $(document).ready( function() {
createHintH("intro", $.i18n('dashboard_label_intro'), "dash_intro");
removeOverlay();
});
});

View File

@ -123,7 +123,7 @@ $(document).ready( function() {
function updateEffectlist(){
if(editorReady)
{
var newEffects = serverInfo.info.effects;
var newEffects = serverInfo.effects;
if (newEffects.length != oldEffects.length)
{
$('#root_foregroundEffect_effect').html('');

View File

@ -10,7 +10,7 @@ $(document).ready( function() {
createHintH("intro", $.i18n('effectsconfigurator_label_intro'), "intro_effc");
function updateDelEffectlist(){
var newDelList = serverInfo.info.effects;
var newDelList = serverInfo.effects;
if(newDelList.length != oldDelList.length)
{
var EffectHtml = null;

View File

@ -65,7 +65,7 @@ $(document).ready( function() {
//hide specific options
conf_editor_fg.on('ready',function() {
var grabbers = serverInfo.info.grabbers.available;
var grabbers = serverInfo.grabbers.available;
if(grabbers.indexOf('dispmanx') > -1)
hideEl(["device","verticalPixelDecimation","horizontalPixelDecimation","useXGetImage"]);

View File

@ -6,14 +6,10 @@ $(document).ready( function() {
initWebSocket();
$(hyperion).on("cmd-serverinfo",function(event){
// get sysinfo only once
if ( typeof(sysInfo.info) == "undefined" )
requestSysInfo();
serverInfo = event.response;
serverInfo = event.response.info;
$(hyperion).trigger("ready");
if (serverInfo.info.hyperion.config_modified)
if (serverInfo.hyperion.config_modified)
$("#hyperion_reload_notify").fadeIn("fast");
else
$("#hyperion_reload_notify").fadeOut("fast");
@ -25,7 +21,7 @@ $(document).ready( function() {
loggingStreamActive = false;
}
if (!serverInfo.info.hyperion.config_writeable)
if (!serverInfo.hyperion.config_writeable)
{
showInfoDialog('uilock',$.i18n('InfoDialog_nowrite_title'),$.i18n('InfoDialog_nowrite_text'));
$('#wrapper').toggle(false);
@ -41,10 +37,11 @@ $(document).ready( function() {
}); // end cmd-serverinfo
$(hyperion).one("cmd-sysinfo", function(event) {
sysInfo = event.response;
currentVersion = sysInfo.info.hyperion.version;
requestServerInfo();
sysInfo = event.response.info;
currentVersion = sysInfo.hyperion.version;
});
$(hyperion).one("cmd-config-getschema", function(event) {
serverSchema = event.response.result;
requestServerConfig();
@ -54,7 +51,7 @@ $(document).ready( function() {
$(hyperion).one("cmd-config-getconfig", function(event) {
serverConfig = event.response.result;
requestServerInfo();
requestSysInfo();
showOptHelp = serverConfig.general.showOptHelp;
});

View File

@ -432,7 +432,7 @@ $(document).ready(function() {
values_general = {};
values_specific = {};
isCurrentDevice = (serverInfo.info.ledDevices.active == $(this).val());
isCurrentDevice = (serverInfo.ledDevices.active == $(this).val());
for(var key in serverConfig.device){
if (key != "type" && key in generalOptions.properties)
@ -455,7 +455,7 @@ $(document).ready(function() {
});
// create led device selection
ledDevices = serverInfo.info.ledDevices.available
ledDevices = serverInfo.ledDevices.available
devRPiSPI = ['apa102', 'ws2801', 'lpd6803', 'lpd8806', 'p9813', 'sk6812spi', 'sk6822spi', 'ws2812spi'];
devRPiPWM = ['ws281x'];
devRPiGPIO = ['piblaster'];
@ -491,7 +491,7 @@ $(document).ready(function() {
$("#leddevices").append(createSel(optArr[3], $.i18n('conf_leds_optgroup_network')));
$("#leddevices").append(createSel(optArr[4], $.i18n('conf_leds_optgroup_usb')));
$("#leddevices").append(createSel(optArr[5], $.i18n('conf_leds_optgroup_debug')));
$("#leddevices").val(serverInfo.info.ledDevices.active);
$("#leddevices").val(serverInfo.ledDevices.active);
$("#leddevices").trigger("change");
// validate textfield and update preview

View File

@ -6,6 +6,7 @@
$(document).ready(function() {
var messages;
var reportUrl = 'https://report.hyperion-project.org/#';
$('#conf_cont').append(createOptPanel('fa-reorder', $.i18n("edt_conf_log_heading_title"), 'editor_container', 'btn_submit'));
if(showOptHelp)
@ -26,13 +27,37 @@ $(document).ready(function() {
requestWriteConfig(conf_editor.getValue());
});
//show prev uploads
var ent;
if(getStorage("prev_reports"))
{
ent = JSON.parse(getStorage("prev_reports"));
$('#prev_reports').append('<hr><h4>'+$.i18n('conf_logging_lastreports')+'</h4>');
for(var i = 0; i<ent.length; i++)
{
$('#prev_reports').append('<p><a href="'+reportUrl+ent[i].id+'" target="_blank">'+ent[i].title+'('+ent[i].time+')</a></p>');
}
}
else
ent = [];
function updateLastReports(id,time,title)
{
if(ent.length > 4)
ent.pop();
ent.unshift({"id": id ,"time": time,"title": title})
setStorage("prev_reports",JSON.stringify(ent));
}
function uploadLog()
{
var reportUrl = 'https://glot.io/snippets/';
var log = "";
var config = JSON.stringify(serverConfig, null, "\t").replace(/"/g, '\\"');
var prios = serverInfo.info.priorities;
var comps = serverInfo.info.components;
var config = JSON.stringify(serverConfig, null).replace(/"/g, '\"');
var prios = serverInfo.priorities;
var comps = serverInfo.components;
var sys = sysInfo.system;
var shy = sysInfo.hyperion;
var info;
//create log
@ -54,16 +79,21 @@ $(document).ready(function() {
log += "["+app_name+" "+logger_name+"] <"+level_string+"> "+debug+msg+"\n";
}
//create general info
info = "######## GENERAL ######## \n";
info += 'Build: '+serverInfo.info.hyperion[0].build+'\n';
info += 'Build time: '+serverInfo.info.hyperion[0].time+'\n';
info += 'Version: '+serverInfo.info.hyperion[0].version+'\n';
info += 'UI Lang: '+storedLang+'\n';
info += 'UI Access: '+storedAccess+'\n';
info += 'Avail Capt: '+serverInfo.info.grabbers.available+'\n\n';
info = "### GENERAL ### \n";
info += 'Build: '+shy.build+'\n';
info += 'Build time: '+shy.time+'\n';
info += 'Version: '+shy.version+'\n';
info += 'UI Lang: '+storedLang+' (BrowserL: '+navigator.language+')\n';
info += 'UI Access: '+storedAccess+'\n';
info += 'Log lvl: '+serverConfig.logger.level+'\n';
info += 'Avail Capt: '+serverInfo.grabbers.available+'\n\n';
info += 'Distribution:'+sys.prettyName+'\n';
info += 'Arch: '+sys.architecture+'\n';
info += 'Kernel: '+sys.kernelType+' ('+sys.kernelVersion+' (WS: '+sys.wordSize+'))\n';
info += 'Browser/OS: '+navigator.userAgent+'\n\n';
//create prios
info += "######## PRIORITIES ######## \n";
info += "### PRIORITIES ### \n";
for(var i = 0; i<prios.length; i++)
{
info += prios[i].priority;
@ -73,23 +103,28 @@ $(document).ready(function() {
info += ' ';
info += ' ('+prios[i].component+') Owner: '+prios[i].owner+'\n';
}
info += '\npriorities_autoselect: '+serverInfo.info.priorities_autoselect+'\n\n';
info += '\npriorities_autoselect: '+serverInfo.priorities_autoselect+'\n\n';
//create comps
info += '######## COMPONENTS ######## \n'
info += '### COMPONENTS ### \n'
for(var i = 0; i<comps.length; i++)
{
info += comps[i].enabled+' - '+comps[i].name+'\n';
}
//escape data
info = JSON.stringify(info);
log = JSON.stringify(log);
config = JSON.stringify(config);
var title = 'Hyperion '+currentVersion+' Report ('+serverConfig.general.name+' ('+serverInfo.ledDevices.active+'))';
$.ajax({
url: 'https://snippets.glot.io/snippets',
// headers: { "Authorization": "Token 9ed92d37-36ca-4430-858f-47b6a3d4d535", "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS,POST,PUT", "Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept, Authorization" },
url: 'https://api.hyperion-project.org/report.php',
crossDomain: true,
contentType: 'application/json',
type: 'POST',
timeout: 7000,
data: '{"language":"plaintext","title":"Hyperion '+currentVersion+' Report ('+serverConfig.general.name+' ('+serverInfo.info.ledDevices.active+'))","public":false,"files":[{"name":"Info","content":"'+info+'"},{"name":"Hyperion Log","content":"'+log+'"},{"name":"Hyperion Config","content":"'+config+'"}]}'
data: '{"title":"'+title+'","info":'+info+',"log":'+log+',"config":'+config+'}'
})
.done( function( data, textStatus, jqXHR ) {
reportUrl += data.id;
@ -97,6 +132,7 @@ $(document).ready(function() {
{
$('#upl_link').html($.i18n('conf_logging_yourlink')+': <a href="'+reportUrl+'" target="_blank">'+reportUrl+'</a>');
$("html, body").animate({ scrollTop: 9999 }, "fast");
updateLastReports(data.id,data.time,title);
}
else
{
@ -105,6 +141,7 @@ $(document).ready(function() {
}
})
.fail( function( jqXHR, textStatus ) {
console.log(jqXHR,textStatus);
$('#btn_logupload').attr("disabled", false);
$('#upl_link').html('<span style="color:red">'+$.i18n('conf_logging_uplfailed')+'<span>');
});

View File

@ -24,7 +24,7 @@ $(document).ready(function() {
//color adjustment
var sColor = sortProperties(serverSchema.properties.color.properties.channelAdjustment.items.properties)
var values = serverInfo.info.adjustment[0]
var values = serverInfo.adjustment[0]
for(key in sColor)
{
@ -86,7 +86,7 @@ $(document).ready(function() {
{
$('.sstbody').html("");
var data = "";
var prios = serverInfo.info.priorities
var prios = serverInfo.priorities
var i;
for(i = 0; i < prios.length; i++)
@ -144,9 +144,9 @@ $(document).ready(function() {
if(btn_type != 'default')
$('.sstbody').append(createTableRow([origin, owner, priority, btn], false, true));
}
var btn_auto_color = (serverInfo.info.priorities_autoselect? "btn-success" : "btn-danger");
var btn_auto_state = (serverInfo.info.priorities_autoselect? "disabled" : "enabled");
var btn_auto_text = (serverInfo.info.priorities_autoselect? $.i18n('general_btn_on') : $.i18n('general_btn_off'));
var btn_auto_color = (serverInfo.priorities_autoselect? "btn-success" : "btn-danger");
var btn_auto_state = (serverInfo.priorities_autoselect? "disabled" : "enabled");
var btn_auto_text = (serverInfo.priorities_autoselect? $.i18n('general_btn_on') : $.i18n('general_btn_off'));
$('#auto_btn').html('<button id="srcBtn'+i+'" type="button" '+btn_auto_state+' class="btn '+btn_auto_color+'" style="margin:10px;display:inline-block;" onclick="requestSetSource(\'auto\');">'+$.i18n('remote_input_label_autoselect')+' ('+btn_auto_text+')</button>');
var max_width=100;
@ -159,7 +159,7 @@ $(document).ready(function() {
function updateLedMapping()
{
mapping = serverInfo.info.ledMAppingType;
mapping = serverInfo.ledMAppingType;
$('#mappingsbutton').html("");
for(var ix = 0; ix < mappingList.length; ix++)
@ -175,7 +175,7 @@ $(document).ready(function() {
function updateComponents()
{
components = serverInfo.info.components;
components = serverInfo.components;
// create buttons
$('#componentsbutton').html("");
for ( idx=0; idx<components.length;idx++)
@ -204,7 +204,7 @@ $(document).ready(function() {
function updateEffectlist()
{
var newEffects = serverInfo.info.effects;
var newEffects = serverInfo.effects;
if (newEffects.length != oldEffects.length)
{
$('#effect_select').html('<option value="__none__"></option>');

View File

@ -3,14 +3,14 @@
var webPrio = 1;
var webOrigin = "Web Configuration";
var showOptHelp;
var currentVersion = "";
var currentVersion;
var latestVersion;
var serverInfo = {};
var parsedUpdateJSON = {};
var serverSchema = {};
var serverConfig = {};
var sysInfo = {};
var schema;
var sysInfo = {};
var jsonPort = 19444;
var websocket = null;
var hyperion = {};
@ -77,6 +77,7 @@ function initWebSocket()
websocket.onopen = function (event) {
$(hyperion).trigger({type:"open"});
$(hyperion).on("cmd-serverinfo", function(event) {
watchdog = 0;
});

View File

@ -235,9 +235,16 @@ function valValue(id,value,min,max)
if(typeof max === 'undefined' || max == "")
max = 999999;
if(value > max || value < min)
if(value > max)
{
$('#'+id).val(max);
showInfoDialog("warning","",$.i18n('edt_msg_error_maximum_incl',max));
return max;
}
else if(value < min)
{
$('#'+id).val(min);
showInfoDialog("warning","",$.i18n('edt_msg_error_minimum_incl',min));
return min;
}
return value;

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -55,7 +55,6 @@ LedDevice * LedDeviceFactory::construct(const QJsonObject & deviceConfig, const
Logger * log = Logger::getInstance("LedDevice");
QJsonDocument config(deviceConfig);
QString ss(config.toJson(QJsonDocument::Indented));
Info(log, "configuration: %s ", ss.toUtf8().constData());
QString type = deviceConfig["type"].toString("UNSPECIFIED").toLower();

View File

@ -43,7 +43,7 @@ StaticFileServing::~StaticFileServing ()
void StaticFileServing::onServerStarted (quint16 port)
{
Info(_log, "started on port %d name \"%s\"", port ,_server->getServerName().toStdString().c_str());
Info(_log, "started on port %d name '%s'", port ,_server->getServerName().toStdString().c_str());
const QString mDNSDescr = _server->getServerName() + "@" + QHostInfo::localHostName();