diff options
author | marc <marc@thinkpad.localnet.cc> | 2011-07-19 19:48:51 +0200 |
---|---|---|
committer | marc <marc@thinkpad.localnet.cc> | 2011-07-19 19:48:51 +0200 |
commit | 4f75de9393cf3be232f92d80ae09ddc162867785 (patch) | |
tree | 1040d89ef117fb2fccfdf4123858b32da29ced22 /ebus/webapp | |
parent | 8973e91ed46cbb4e1b192de802f0beecb19e7e06 (diff) | |
download | ebus-alt-4f75de9393cf3be232f92d80ae09ddc162867785.tar.gz ebus-alt-4f75de9393cf3be232f92d80ae09ddc162867785.zip |
Datensätze löschen alpha
Diffstat (limited to 'ebus/webapp')
-rw-r--r-- | ebus/webapp/static/ebus.js | 19 | ||||
-rw-r--r-- | ebus/webapp/static/index.html | 1 | ||||
-rw-r--r-- | ebus/webapp/static/main.css | 13 |
3 files changed, 25 insertions, 8 deletions
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) { @@ -56,6 +60,9 @@ $(document).ready(function(){ } }); }; + var unplotSensorDetail = function(sensorname) { + + }; var plotSensorOverview = function(sensorname) { $.getJSON("sensor_cached/"+escape(sensorname)+"/"+fromOverview, //+"/"+to, function(response) { @@ -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(); + } + }); + }); }); diff --git a/ebus/webapp/static/index.html b/ebus/webapp/static/index.html index f80da99..e385865 100644 --- a/ebus/webapp/static/index.html +++ b/ebus/webapp/static/index.html @@ -9,5 +9,6 @@ <body> <div id="ebusgraph"></div> <div id="overview"></div> + <div id="button">ausblenden</div> </body> </html> diff --git a/ebus/webapp/static/main.css b/ebus/webapp/static/main.css index e67d5d9..13cd761 100644 --- a/ebus/webapp/static/main.css +++ b/ebus/webapp/static/main.css @@ -1,15 +1,16 @@ body { font-family:sans; + text-align:center; } #ebusgraph { - width:90%; - margin-left: 5%; - height:75%; + width:800px; + margin:auto; + height:400px; } #overview { - width:90%; - margin-left: 5%; - height:20%; + width:800px; + margin:auto; + height:100px; } |