summaryrefslogtreecommitdiff
path: root/ebus/webapp/static/index.html
diff options
context:
space:
mode:
authoryvesf <yvesf-git@xapek.org>2011-07-17 15:00:26 +0200
committeryvesf <yvesf-git@xapek.org>2011-07-17 15:00:26 +0200
commit647288db34eaedb9f1bb126d6714305d0ac50e67 (patch)
treedf32e614aac343285b9d666bba126eda30e70489 /ebus/webapp/static/index.html
parentc5fb76f07ec013e90c2ff41b7439b21402002788 (diff)
downloadebus-alt-647288db34eaedb9f1bb126d6714305d0ac50e67.tar.gz
ebus-alt-647288db34eaedb9f1bb126d6714305d0ac50e67.zip
cache und startdatei
* die anwendung umgestellt das sie den cache benutzt * web.py umgestellt dass sie das ebus.webapp modul startet
Diffstat (limited to 'ebus/webapp/static/index.html')
-rw-r--r--ebus/webapp/static/index.html28
1 files changed, 22 insertions, 6 deletions
diff --git a/ebus/webapp/static/index.html b/ebus/webapp/static/index.html
index 754fd62..1decced 100644
--- a/ebus/webapp/static/index.html
+++ b/ebus/webapp/static/index.html
@@ -5,17 +5,33 @@
<script src="/static/jquery.flot.js"></script>
<script>
$(document).ready(function(){
- var from = Math.round(new Date().getTime()/1000) - 86400;
+ var from = Math.round(new Date().getTime()/1000) - 3*24*60*60; //86400;
var to = Math.round(new Date().getTime()/1000);
- $.getJSON("/sensor/heizkreisregler9.solarDaten.tempKollektor/"+from+"/"+to,
- function(data) {
- $.plot($("#ebusgraph"), [data], { xaxis: { mode: "time"}});
- });
+ 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>
- <h1>TEST</h1>
<div id="ebusgraph"></div>
</body>
</html>