summaryrefslogtreecommitdiff
path: root/ebus/web/static/index.html
diff options
context:
space:
mode:
authoryvesf <yvesf-git@xapek.org>2011-07-24 11:05:42 +0200
committeryvesf <yvesf-git@xapek.org>2011-07-24 11:05:42 +0200
commit75017423563a18986aa096566d8a2969c32c3588 (patch)
treebd86ab746dd06f71ebd1b723e3bec754805e8736 /ebus/web/static/index.html
parenta0382ecfbef32b47b7438170feaa7b81d7bc22db (diff)
downloadebus-alt-75017423563a18986aa096566d8a2969c32c3588.tar.gz
ebus-alt-75017423563a18986aa096566d8a2969c32c3588.zip
clean up file structure, use bottle soup plugin
Diffstat (limited to 'ebus/web/static/index.html')
-rw-r--r--ebus/web/static/index.html93
1 files changed, 0 insertions, 93 deletions
diff --git a/ebus/web/static/index.html b/ebus/web/static/index.html
deleted file mode 100644
index 3c8445a..0000000
--- a/ebus/web/static/index.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>EBUS Daten</title>
- <script src="/static/jquery.js"></script>
- <script src="/static/jquery-flot.js"></script>
- </head>
- <body>
- <div id="placeholder">Aktivieren Sie JavaScript</div>
- <script>
- var placeholder = jQuery("div#placeholder");
- placeholder.css({fontSize:"2em", paddingLeft:"30%"}).text("Hole Daten");
- var options = {
- lines: { show: true },
- points: { show: true },
- xaxis: { mode:'time' },
- grid: { markings: [] }
- };
- function onDataReceived(recData) {
- data = new Array();
- for (var key in recData) {
- if (! key.match(/\.reduced/)) {
- data.push(recData[key]);
- }
- }
- placeholder.css({width:"90%", height:window.innerHeight-100, paddingLeft:0, fontSize:"1em"}).text("");
- plot = $.plot(placeholder, data, options);
-
- var start = null;
- for (var m in recData["solarDaten.solarPumpe.reduced"].data) {
- m = recData["solarDaten.solarPumpe.reduced"].data[m];
- pumpeAn = m[1];
-
- if (pumpeAn && start == null)
- start = m[0];
- else if (!pumpeAn && start != null) {
- options.grid.markings.push({
- color: "rgba(100, 200, 15, 0.5)",
- lineWidth: 1,
- xaxis: { from: start, to: m[0]}});
- start = null;
- } else {
- start = null;
- }
- }
- if (start != null)
- options.grid.markings.push({
- color: "rgba(100, 200, 15, 0.5)",
- lineWidth: 1,
- xaxis: { from: start, to:99999999999999}});
-
- var start = null;
- for (var m in recData["betriebsdatenFeuerungsautomat.betriebszustand.reduced"].data) {
- m = recData["betriebsdatenFeuerungsautomat.betriebszustand.reduced"].data[m];
- if (m[1] == "brauchwasserHeizbetrieb" && start == null) {
- start = m[0];
- } else if (m[1] == "brennerAbschalten" && start != null) {
- options.grid.markings.push({
- color: "rgba(205, 15, 15, 0.5)",
- lineWidth: 1,
- xaxis: { from: start, to: m[0]}});
- start = null;
- }
- }
- if (start != null)
- options.grid.markings.push({
- color: "rgba(205, 15, 15, 0.5)",
- lineWidth: 1,
- xaxis: { from: start, to: 99999999999999}});
-
-
- // replot
- plot = $.plot(placeholder, data, options);
- }
- jQuery(document).ready(function() {
- var dataTypes = [
- "solarDaten.tempKollektor",
- "solarDaten.tempWarmwasserSolar",
- "betriebsdatenRegler1.aussenTemperatur",
- "betriebsdatenRegler1.kesselTemperatur",
- "betriebsdatenRegler1.boilerTemperatur",
- "solarDaten.solarPumpe.reduced",
- "betriebsdatenFeuerungsautomat.betriebszustand.reduced"
- ]
- $.ajax({
- url:'/json/' + dataTypes.join(","),
- method:'GET',
- dataType:'json',
- success: onDataReceived});
- });
- </script>
- </body>
-</html>