diff options
Diffstat (limited to 'datastore-leveldb/wwwroot_ebus/src/ebus.js')
-rw-r--r-- | datastore-leveldb/wwwroot_ebus/src/ebus.js | 96 |
1 files changed, 75 insertions, 21 deletions
diff --git a/datastore-leveldb/wwwroot_ebus/src/ebus.js b/datastore-leveldb/wwwroot_ebus/src/ebus.js index ae4c0e8..a76c62e 100644 --- a/datastore-leveldb/wwwroot_ebus/src/ebus.js +++ b/datastore-leveldb/wwwroot_ebus/src/ebus.js @@ -30,7 +30,7 @@ $(document).ready(function(){ "name":"heizkreisregler10.betriebsdatenRegler1.kesselTemperatur", "description":"Kessel Temperatur", "values":Math.ceil(jQuery("#ebusgraph").width()/8), - "lines":{fill: true, fillColor: "rgba(80,40,100, 0.1)"}, + "lines":{fill: true, lineWidth: 1, fillColor: "rgba(80,40,100, 0.05)"}, "show":true, "color":"rgb(80,40,100)" }, @@ -45,10 +45,10 @@ $(document).ready(function(){ { "name":"heizkreisregler9.solarDaten.tempWarmwasserSolar", "description":"Warmwasser Solar", - "lines":{fill: true, fillColor: "rgba(30,250,20,0.05)"}, + "lines":{fill: true, fillColor: "rgba(252,133,30,0.1)"}, "values":Math.ceil(jQuery("#ebusgraph").width()/8), - "show":true, - "color":"rgba(30,250,20,0.5)" + "show":false, + "color":"rgba(252,133,34,0.5)" }, { "name":"feuerungsautomat1.betriebsdatenRegler1.aussenTemperatur", @@ -58,14 +58,6 @@ $(document).ready(function(){ "lines":{fill: true, fillColor: "rgba(250, 250, 0, 0.2)"}, "color":"rgb(250,250,0)" }, -//{ -// "name":"dockstar.load5", -// "description":"System Load (5m, *10)", -// "lines":{lineWidth:1}, -// "show":false, -// "color":"blue", -// "mapFunc":function(d){return [d[0],d[1]*10]} -//}, { "name":"heizkreisregler10.betriebsdatenRegler1.boilerTemperatur", "description":"Boilertemperatur", @@ -75,12 +67,74 @@ $(document).ready(function(){ }, { "name":"de.wettermichel.temperature", - "description":"Aussentemperatur (wettermichel)", - "show":true, + "description":"Temperatur (Celsius) (wettermichel)", + "show":false, "values":Math.ceil(jQuery("#ebusgraph").width()/16), "lines":{fill: true, fillColor: "rgba(132, 181, 0, 0.2)"}, "color":"#84b500" }, +{ + "name":"de.wettermichel.rainToday", + "description": "Regen heute (mm) (wettermichel)", + "show":false, + "values":Math.ceil(jQuery("#ebusgraph").width()/16), + "lines":{fill: true, fillColor: "rgba(10, 18, 250, 0.2)"}, + "color":"blue" +}, +{ + "name":"de.wettermichel.humidity", + "description": "Luftfeuchtigkeit (%) (wettermichel)", + "show": false, + "values":Math.ceil(jQuery("#ebusgraph").width()/8), + "lines":{fill: false, lineWidth:1}, + "color":"rgb(100,100,200)" +}, +{ + "name":"adsl.in.percent", + "description": "ADSL In/Download", + "show":false, + "values":Math.ceil(jQuery("#ebusgraph").width()/8), + "lines":{fill: false, lineWidth:1}, + "color":"black", +}, +{ + "name":"adsl.out.percent", + "description": "ADSL Out/Upload", + "show":false, + "values":Math.ceil(jQuery("#ebusgraph").width()/8), + "lines":{fill: false, lineWidth:1}, + "color":"gray", +}, +{ + "name":"dockstar.load5", + "description":"System Load (5m, *10)", + "lines":{lineWidth:1}, + "show":false, + "color":"blue", + "mapFunc":function(d){return [d[0],d[1]*10]} +}, +{ + "name":"dockstar.fs.ROOT", + "description":"Filesystem / Free (%)", + "lines":{lineWidth:1}, + "show":false, + "color":"black", +}, +{ + "name":"yves.laserjet.tonerstatus", + "description":"Yves Tonerstatus (%)", + "lines":{lineWidth:1}, + "show":false, + "color":"black", +}, +{ + "name":"dockstar.internet.latency_ns", + "description":"Internet latency in ms", + "lines":{lineWidth:1}, + "show":false, + "color":"black", + "mapFunc":function(d){return [d[0],d[1]/1000/1000]} +}, ]; var pickSensorConfig = function(sensorname) { @@ -99,12 +153,11 @@ var replot = function() { plotDetail.getOptions().xaxes[0].max = timeToLocal(to); plotDetail.setupGrid(); plotDetail.draw(); +} - // insert legend - $("#ebusgraph").find(".legend").remove(); - var fragments = []; - var legend = jQuery("<div>").addClass("legend").css({position: "absolute", right: "0px", top: "0px", background: "rgba(240,240,240,0.55)"}); - var table = jQuery("<table>").appendTo(legend); +var insertLegend = function() { + $("#legend").children().remove(); + var table = jQuery("<table>"); for (var i = 0; i < sensorConfigList.length; i++) { var config = sensorConfigList[i]; var row = jQuery("<tr>"); @@ -129,9 +182,9 @@ var replot = function() { table.append(row); } - legend.appendTo($("#ebusgraph")); - + $("#legend").append(table); }; + var replotOverview = function() { plotOverview.setData(datasetOverview); plotOverview.setSelection({xaxis: {"from": timeToLocal(from), "to": timeToLocal(to)}}, true); @@ -288,6 +341,7 @@ $("#overview").bind("plotselected", function (event, ranges) { update_range(range_from, range_to); }); +insertLegend(); $.each(sensorConfigList, function(i,sensorConfig) { //var pickerDiv = $("<div>").addClass("picker").appendTo("#sensorpicker"); //var pickerCheckbox = $("<input>").attr("type","checkbox").appendTo(pickerDiv); |