From b0fdb14b806f346808248d00eb5f6e24edec5167 Mon Sep 17 00:00:00 2001 From: Ebus-at-dockstar Date: Thu, 18 Sep 2014 18:19:26 +0200 Subject: remove series --- datastore-leveldb/wwwroot_ebus/src/ebus.js | 64 ++++++++++++++++-------------- 1 file changed, 35 insertions(+), 29 deletions(-) (limited to 'datastore-leveldb/wwwroot_ebus/src/ebus.js') diff --git a/datastore-leveldb/wwwroot_ebus/src/ebus.js b/datastore-leveldb/wwwroot_ebus/src/ebus.js index fae08cd..eb0cb2d 100644 --- a/datastore-leveldb/wwwroot_ebus/src/ebus.js +++ b/datastore-leveldb/wwwroot_ebus/src/ebus.js @@ -27,7 +27,7 @@ $(document).ready(function(){ var indexFound = null; var defaultSensorConfigList = [ { - "name":"heizkreisregler10.betriebsdatenRegler1.kesselTemperatur", + "id":"heizkreisregler10.betriebsdatenRegler1.kesselTemperatur", "description":"Kessel Temperatur", "values":Math.ceil(jQuery("#ebusgraph").width()/6), "lines":{fill: true, lineWidth: 1, fillColor: "rgba(80,40,100, 0.05)"}, @@ -35,7 +35,7 @@ $(document).ready(function(){ "color":"rgb(80,40,100)" }, { - "name":"heizkreisregler9.solarDaten.tempKollektor", + "id":"heizkreisregler9.solarDaten.tempKollektor", "description":"Kollektortemperatur", "lines":{fill: true, fillColor: "rgba(255, 0, 0, 0.4)"}, "values":Math.ceil(jQuery("#ebusgraph").width()/1), @@ -43,7 +43,7 @@ $(document).ready(function(){ "color":"#f30000" }, { - "name":"heizkreisregler9.solarDaten.tempWarmwasserSolar", + "id":"heizkreisregler9.solarDaten.tempWarmwasserSolar", "description":"Warmwasser Solar", "lines":{fill: true, fillColor: "rgba(252,133,30,0.1)"}, "values":Math.ceil(jQuery("#ebusgraph").width()/8), @@ -51,14 +51,14 @@ $(document).ready(function(){ "color":"rgba(252,133,34,0.5)" }, { - "name":"heizkreisregler10.betriebsdatenRegler1.boilerTemperatur", + "id":"heizkreisregler10.betriebsdatenRegler1.boilerTemperatur", "description":"Boilertemperatur", "values":Math.ceil(jQuery("#ebusgraph").width()/8), "show":false, "color":"#48b4ff" }, { - "name":"de.wettermichel.temperature", + "id":"de.wettermichel.temperature", "description":"Temperatur (Celsius) (wettermichel)", "show":false, "values":Math.ceil(jQuery("#ebusgraph").width()/4), @@ -66,7 +66,7 @@ $(document).ready(function(){ "color":"#84b500" }, { - "name":"dockstar.load5", + "id":"dockstar.load5", "description":"System Load (5m, *10)", "lines":{lineWidth:1}, "show":false, @@ -74,7 +74,7 @@ $(document).ready(function(){ "mapFunc":function(d){return [d[0],d[1]*10]} }, { - "name":"dockstar.internet.latency_ns", + "id":"dockstar.internet.latency_ns", "description":"Internet latency in ms", "lines":{lineWidth:1}, "show":false, @@ -84,10 +84,10 @@ $(document).ready(function(){ ]; var sensorConfigList = JSON.parse(window.localStorage.getItem("ebusConfig")) || defaultSensorConfigList; -var pickSensorConfig = function(sensorname) { +var pickSensorConfig = function(sensorid) { var sensorConfigFound; $.each(sensorConfigList, function(i,sensorConfig) { - if (sensorConfig["name"] == sensorname) { + if (sensorConfig["id"] == sensorid) { sensorConfigFound = sensorConfig; return false; } @@ -113,20 +113,26 @@ var redrawLegend = function() { var checkbox = jQuery("").attr("type","checkbox").appendTo(colorBoxBox); checkbox.attr("checked", config.show); checkbox.css({opacity:0.6}); - checkbox.data("name", config.name); + checkbox.data("id", config.id); checkbox.click(function() { - var config = pickSensorConfig($(this).data("name")); + var config = pickSensorConfig($(this).data("id")); config.show = $(this).prop("checked"); if (config.show) { plotSensor(config); } else { - unplotSensor(config.name); + unplotSensor(config.id); } }); var label = jQuery("").addClass("legendLabel").appendTo(row); jQuery("").text(sensorConfigList[i].description).appendTo(label); - + jQuery("