git://git.onelab.eu
/
unfold.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
almost working
[unfold.git]
/
plugins
/
senslabmap
/
static
/
js
/
senslabmap.js
diff --git
a/plugins/senslabmap/static/js/senslabmap.js
b/plugins/senslabmap/static/js/senslabmap.js
index
ef7007a
..
10abf41
100644
(file)
--- a/
plugins/senslabmap/static/js/senslabmap.js
+++ b/
plugins/senslabmap/static/js/senslabmap.js
@@
-17,6
+17,7
@@
initialize_map: function() {
this.nodes = [];
initialize_map: function() {
this.nodes = [];
+ this.id = 0;
},
refresh: function() {
},
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"
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);
this.nodes.push(node);
+ console.log("node id " + this.id);
},
on_all_query_done: function() {
},
on_all_query_done: function() {