Skip to content
Snippets Groups Projects
Commit 7d31ebb8 authored by void's avatar void
Browse files

alte werte ausfiltern / link auf statische seite

parent 83dce9cb
No related branches found
No related tags found
No related merge requests found
......@@ -19,32 +19,37 @@
function queryWankerStatus() {
jQuery.getJSON("/api/status",function(result) {
if (result != null && result.tuerOffen != null)
if ( result.age < 600)
{
if (result.tuerOffen == 1)
{
jQuery("#wankerTuerOffen").html("<font color=\"00cc00\">Offen</font>");
}
else
{
jQuery("#wankerTuerOffen").html("<font color=\"cc0000\">Geschlossen</font>");
}
}
if (result != null && result.tuerOffen != null)
{
if (result.tuerOffen == 1)
{
jQuery("#wankerTuerOffen").html("<font color=\"00cc00\">Offen</font>");
}
else
{
jQuery("#wankerTuerOffen").html("<font color=\"cc0000\">Geschlossen</font>");
}
}
if (result != null && result.tempLounge != null && result.tempLounge)
{
var tempLounge = (result.tempLounge / 10) + "&deg;C";
jQuery("#wankerTempLounge").html(tempLounge);
}
if (result != null && result.tempLounge != null && result.tempLounge)
{
var tempLounge = (result.tempLounge / 10) + "&deg;C";
jQuery("#wankerTempLounge").html(tempLounge);
}
if (result != null && result.tempWerkstatt != null && result.tempWerkstatt)
{
var tempWerkstatt = (result.tempWerkstatt / 10) + "&deg;C";
jQuery("#wankerTempWerkstatt").html(tempWerkstatt);
}
if (result != null && result.tempWerkstatt != null && result.tempWerkstatt)
{
var tempWerkstatt = (result.tempWerkstatt / 10) + "&deg;C";
jQuery("#wankerTempWerkstatt").html(tempWerkstatt);
}
}
});
......@@ -58,8 +63,8 @@ jQuery(document).ready(function() {
</script>
<ul>
<li><span class="zonenstatus">Status: <span id="wankerTuerOffen" class="wankerClosed">Unbekannt</span></span></li>
<li><span class="zonenstatus">Lounge: <span id="wankerTempLounge">--</span></span></li>
<li><span class="zonenstatus">Werkstatt: <span id="wankerTempWerkstatt">--</span></span></li>
<li><a class="zonenstatus" href="/api/static">Status: <span id="wankerTuerOffen" class="wankerClosed">Unbekannt</span></a></li>
<li><a class="zonenstatus" href="/api/static">Lounge: <span id="wankerTempLounge">--</span></a></li>
<li><a class="zonenstatus" href="/api/static">Werkstatt: <span id="wankerTempWerkstatt">--</span></a></li>
</ul>
<!-- /WARPZONE status -->
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment