From aed0ffdc0b0cad9bc2175f718249a6fa4f7d7158 Mon Sep 17 00:00:00 2001 From: Anthony Garcia Date: Mon, 30 Sep 2013 12:54:40 +0200 Subject: [PATCH] almost working --- plugins/senslabmap/static/js/senslabmap.js | 5 ++++- plugins/senslabmap/templates/senslabmap.html | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) 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
-- 2.43.0