From 4f75de9393cf3be232f92d80ae09ddc162867785 Mon Sep 17 00:00:00 2001 From: marc Date: Tue, 19 Jul 2011 19:48:51 +0200 Subject: =?UTF-8?q?Datens=C3=A4tze=20l=C3=B6schen=20alpha?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ebus/webapp/static/ebus.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'ebus/webapp/static/ebus.js') diff --git a/ebus/webapp/static/ebus.js b/ebus/webapp/static/ebus.js index 4563ee9..e108f0a 100644 --- a/ebus/webapp/static/ebus.js +++ b/ebus/webapp/static/ebus.js @@ -1,5 +1,5 @@ $(document).ready(function(){ - var from = Math.round(new Date().getTime()/1000) - 3*24*60*60; //86400; + var from = Math.round(new Date().getTime()/1000) - 24*60*60; //86400; var fromOverview = Math.round(new Date().getTime()/1000) - 30*24*60*60; //86400; var to = Math.round(new Date().getTime()/1000); var datasetDetail = [] @@ -43,7 +43,11 @@ $(document).ready(function(){ var plotSensor = function(sensorname) { plotSensorDetail(sensorname); plotSensorOverview(sensorname); - } + }; + var unplotSensor = function(sensorname) { + unplotSensorDetail(sensorname); + unplotSensorOverview(sensorname); + }; var plotSensorDetail = function(sensorname) { $.getJSON("sensor/"+escape(sensorname)+"/"+from+"/"+to, function(response) { @@ -55,6 +59,9 @@ $(document).ready(function(){ alert("Fehler: " + response["error"]); } }); + }; + var unplotSensorDetail = function(sensorname) { + }; var plotSensorOverview = function(sensorname) { $.getJSON("sensor_cached/"+escape(sensorname)+"/"+fromOverview, //+"/"+to, @@ -96,4 +103,12 @@ $(document).ready(function(){ plotSensor("heizkreisregler10.betriebsdatenRegler1.kesselTemperatur"); plotSensor("feuerungsautomat1.betriebsdatenRegler1.aussenTemperatur"); // TODO http://people.iola.dk/olau/flot/examples/annotating.html + $('#button').click(function() { + $.each(datasetDetail, function(i, sensor) { + if (datasetDetail[i].label == "heizkreisregler9.solarDaten.tempKollektor") { + datasetDetail.splice(i,1); + replot(); + } + }); + }); }); -- cgit v1.2.1