blob: 1deccedff27fa4f4a043b7dc4e275e7107af8a4d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<html>
<head>
<link rel="stylesheet" type="text/css" href="/static/main.css" />
<script src="/static/jquery-1.6.2.min.js"></script>
<script src="/static/jquery.flot.js"></script>
<script>
$(document).ready(function(){
var from = Math.round(new Date().getTime()/1000) - 3*24*60*60; //86400;
var to = Math.round(new Date().getTime()/1000);
var dataset = []
var replot = function() {
$.plot($("#ebusgraph"), dataset, { xaxis: { mode: "time"}});
};
var plotSensor = function(sensorname) {
$.getJSON("/sensor_cached/"+escape(sensorname)+"/"+from, //+"/"+to,
function(response) {
if (response['data']) {
data = response['data'];
dataset.push({'data':data,'label':sensorname});
replot();
} else {
alert("Fehler: " + response["error"]);
}
});
}
plotSensor("heizkreisregler9.solarDaten.tempKollektor");
plotSensor("heizkreisregler9.solarDaten.tempWarmwasserSolar");
plotSensor("heizkreisregler10.betriebsdatenRegler1.kesselTemperatur");
plotSensor("feuerungsautomat1.betriebsdatenRegler1.aussenTemperatur");
// TODO http://people.iola.dk/olau/flot/examples/annotating.html
});
</script>
</head>
<body>
<div id="ebusgraph"></div>
</body>
</html>
|