www/js/mon_node-min.js

Wed, 16 Oct 2019 21:05:03 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 16 Oct 2019 21:05:03 +0200
changeset 514
3c680d1dea35
parent 494
af28ebe4a779
permissions
-rw-r--r--

Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.

494
af28ebe4a779 Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents: 463
diff changeset
1 $(document).ready(function(){var a="getnode.php?uuid='"+my_uuid+"'",b={datatype:"json",datafields:[{name:"record",type:"int"},{name:"uuid",type:"string"},{name:"node",type:"string"},{name:"online",type:"bool"},{name:"group_id",type:"string"},{name:"hardwaremake",type:"string"},{name:"hardwaremodel",type:"string"},{name:"os",type:"string"},{name:"os_version",type:"string"},{name:"firmware",type:"string"},{name:"firstseen",type:"string"},{name:"lastseen",type:"string"},{name:"temperature",type:"float"},{name:"humidity",type:"float"},{name:"barometer",type:"float"},{name:"gps_latitude",type:"float"},{name:"gps_longitude",type:"float"},{name:"gps_altitude",type:"float"},{name:"net_address",type:"string"},{name:"net_ifname",type:"string"},{name:"net_rssi",type:"int"}],id:"record",url:a},c=new $.jqx.dataAdapter(b,{loadComplete:function(e){var d=c.records[0],f="<div id='node_table'>";f+="<table style='width: 100%; padding: 10px;'>";f+="<tr><th colspan=2>Systeem overzicht</th></tr>";f+="<tr><td>Uuid</td><td>"+d.uuid+"</td></tr>";f+="<tr><td>Systeem</td><td>"+d.node+"</td></tr>";f+="<tr><td>Online</td><td>"+d.online+"</td></tr>";f+="<tr><td>Type</td><td>"+d.group_id+"</td></tr>";f+="<tr><td>Eerst gezien</td><td>"+d.firstseen+"</td></tr>";f+="<tr><td>Laatst gezien</td><td>"+d.lastseen+"</td></tr>";f+="<tr><td>Hardware maker</td><td>"+d.hardwaremake+"</td></tr>";f+="<tr><td>Hardware model</td><td>"+d.hardwaremodel+"</td></tr>";f+="<tr><td>OS</td><td>"+d.os+" versie: "+d.os_version+"</td></tr>";f+="<tr><td>Firmware</td><td>"+d.firmware+"</td></tr>";if(d.online){f+="<tr><td>Temperatuur</td><td>"+d.temperature.toFixed(1)+"&deg;C</td></tr>";if(d.humidity>0){f+="<tr><td>Vochtigheid</td><td>"+d.humidity.toFixed(1)+"%</td></tr>"}if(d.barometer>0){f+="<tr><td>Luchtdruk</td><td>"+d.barometer.toFixed(0)+"</td></tr>"}if((d.gps_latitude!=0)&&(d.gps_longitude!=0)){f+="<tr><td>GPS</td><td>"+d.gps_latitude+" "+d.gps_longitude+" "+d.gps_altitude+"</td></tr>"}f+="<tr><td>Netwerk</td><td>"+d.net_ifname+" "+d.net_address+"</td></tr>"}f+="</<table>";f+="</div>";$("#ContentPanel").html(f)}});c.dataBind();setInterval(function(){c.dataBind()},30000)});

mercurial