add a waiting note to the netmap whilst the data loads

This commit is contained in:
Oliver Gorwits
2014-02-22 09:06:30 +00:00
parent db8d2ed17f
commit cb84f872c5
2 changed files with 6 additions and 0 deletions

View File

@@ -11,6 +11,7 @@
* Kwalitee fixes * Kwalitee fixes
* Change default number of pollers to 10 * Change default number of pollers to 10
* Default netmap depth set to 8 * Default netmap depth set to 8
* Add a "waiting" message to the netmap whilst the data loads
[BUG FIXES] [BUG FIXES]

View File

@@ -115,6 +115,9 @@ $.getJSON('[% uri_for('/ajax/data/device/alldevicelinks') %]', function(data) {
.attr("class", "node") .attr("class", "node")
.attr("transform", function(d) { return "rotate(" + (d.x - 90) + ")translate(" + d.y + ")"; }); .attr("transform", function(d) { return "rotate(" + (d.x - 90) + ")translate(" + d.y + ")"; });
// begin to draw...
d3.select("#nd_waiting").remove();
node.append("circle") node.append("circle")
.attr("r", 4.5) .attr("r", 4.5)
// circle has class name of its device, so we can show/hide it // circle has class name of its device, so we can show/hide it
@@ -180,3 +183,5 @@ $.getJSON('[% uri_for('/ajax/data/device/alldevicelinks') %]', function(data) {
// vim: ft=javascript // vim: ft=javascript
</script> </script>
<div id="nd_waiting" class="span2 alert"><i class="icon-spinner icon-spin"></i> Waiting for results...</div>