X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fsenslabmap%2Fstatic%2Fjs%2Fsenslabmap.js;h=e6a64b5814fc59e9789e6c25896f2db4c5cea5ce;hb=91dec1137db6f3b461ab40542f06b5fa93a2efa5;hp=a306219361a857b7e348b962cd286d1c53d3991d;hpb=8be9b358a544e1ea9e53ad40495fa42e9d5edf9a;p=myslice.git diff --git a/plugins/senslabmap/static/js/senslabmap.js b/plugins/senslabmap/static/js/senslabmap.js index a3062193..e6a64b58 100644 --- a/plugins/senslabmap/static/js/senslabmap.js +++ b/plugins/senslabmap/static/js/senslabmap.js @@ -1,6 +1,7 @@ (function($){ var SensLabMap = Plugin.extend({ init: function(options, element) { + this.classname="senslabmap"; this._super(options, element); this.elmt().on('show', this, this.on_show); @@ -31,20 +32,20 @@ } this.nodes[site].push(node); } else { - console.warn("node has no site:"); - console.warn(node); +// xxx would need a smarter way to report these only on nodes that deserve it +// these messages are all over the place in a PL setup and tend to hide helpful signal +// console.warn("node has no site:"); +// console.warn(node); } }, on_all_query_done: function() { - var self = this; + var uuid = this.options.query_uuid; + var key = this.key - Senslab.createMaps($('#maps-container'), this.sites, this.nodes); + Senslab.createMaps($("#maps-container"), this.sites, this.nodes); Senslab.notify = function(node) { - manifold.raise_event(self.options.query_uuid, - node.boot_state == "Alive" ? SET_REMOVED : SET_ADD, - node[self.key] - ); + manifold.raise_event(uuid, node.selected ? SET_ADD : SET_REMOVED, node[key]); } } });