From: Anthony Garcia Date: Mon, 30 Sep 2013 10:54:40 +0000 (+0200) Subject: almost working X-Git-Url: http://git.onelab.eu/?p=unfold.git;a=commitdiff_plain;h=aed0ffdc0b0cad9bc2175f718249a6fa4f7d7158 almost working --- diff --git a/plugins/senslabmap/static/js/senslabmap.js b/plugins/senslabmap/static/js/senslabmap.js index ef7007af..10abf415 100644 --- a/plugins/senslabmap/static/js/senslabmap.js +++ b/plugins/senslabmap/static/js/senslabmap.js @@ -17,6 +17,7 @@ initialize_map: function() { this.nodes = []; + this.id = 0; }, refresh: function() { @@ -31,8 +32,10 @@ on_all_new_record: function(n) { // format is : [name, x, y, z, uid, state] // state = "Busy", "Alive" or "Down" - node = [42, n.x, n.y, n.z, "bb40", "Alive"]; + this.id++; + node = [this.id, n.x, n.y, n.z, this.id, "Alive"]; this.nodes.push(node); + console.log("node id " + this.id); }, on_all_query_done: function() { diff --git a/plugins/senslabmap/templates/senslabmap.html b/plugins/senslabmap/templates/senslabmap.html index fa5659c1..c00ea643 100644 --- a/plugins/senslabmap/templates/senslabmap.html +++ b/plugins/senslabmap/templates/senslabmap.html @@ -8,10 +8,10 @@
- Alive - - Down - - Selected - - Busy +
Alive - +
Down - +
Selected - +
Busy