initial
This commit is contained in:
59
onedb.html
Normal file
59
onedb.html
Normal file
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Wunderground obs</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.js" integrity="sha512-WNLxfP/8cVYL9sj8Jnp6et0BkubLP31jhTG9vhL/F5uEZmg5wEzKoXp1kJslzPQWwPT1eyMiSxlKCgzHLOTOTQ==" crossorigin="anonymous"></script>
|
||||
<link href="https://unpkg.com/tabulator-tables@4.7.2/dist/css/tabulator.min.css" rel="stylesheet">
|
||||
<script type="text/javascript" src="https://unpkg.com/tabulator-tables@4.7.2/dist/js/tabulator.min.js"></script>
|
||||
<button onclick="reloadData()">Data autorefreshes every 5 minutes, click to refresh now</button>
|
||||
<a>QPE 00L is direct from WU, the other QPE are derived and may be off if time settings on the individual PWS are incorrect</a>
|
||||
<input type="checkbox" id="cwa" name="cwa" value="RLX" onchange="filters()">
|
||||
<label for="cwa">RLX only</label><br>
|
||||
<div id="wunderobs"></div>
|
||||
|
||||
<script>
|
||||
|
||||
function googleMap(cell, formatterParams){
|
||||
return "http://maps.google.com/maps?t=k&q=loc:" + cell.getData().lat + "+" + cell.getData().lon + "&basemap=satellite";
|
||||
}
|
||||
|
||||
|
||||
function reloadData() {
|
||||
table.replaceData("dbone.php");
|
||||
}
|
||||
|
||||
var table = new Tabulator("#wunderobs", {
|
||||
responsiveLayout:true,
|
||||
tooltipsHeader:true,
|
||||
columns:[
|
||||
{title:"Station", field:"sitename"},
|
||||
{title:"T", field:"tempf"},
|
||||
{title:"QPE 00L", field:"preciptotal",formatter:"money",headerTooltip:"Since Midnight"},
|
||||
{title:"Winddir", field:"winddir"},
|
||||
{title:"Speed", field:"windspd",headerTooltip:"Mph"},
|
||||
{title:"Gust", field:"windgust",headerTooltip:"Mph"}
|
||||
|
||||
],
|
||||
});
|
||||
|
||||
table.setData("oneraindb.php");
|
||||
|
||||
function filters() {
|
||||
var y = document.getElementById("cwa").checked;
|
||||
if (y) {
|
||||
table.addFilter("cwa", "=", 'RLX');
|
||||
}
|
||||
if (!y) {
|
||||
table.removeFilter("cwa", "=", 'RLX');
|
||||
}
|
||||
}
|
||||
// {title:"24hr QPE", field:"rain24", formatterParms:{precision:2}},
|
||||
var timeout = setInterval(reloadData, 300000);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user