denser iperf display
don't pop alert on command error response
diff --git a/web/ons-demo/RELEASE_NOTES.txt b/web/ons-demo/RELEASE_NOTES.txt
index 90af6d1..08e6ba0 100644
--- a/web/ons-demo/RELEASE_NOTES.txt
+++ b/web/ons-demo/RELEASE_NOTES.txt
@@ -1,4 +1,8 @@
** April 4, 2013 **
+- denser iperf display
+- don't pop alert on command error response. just log it
+
+** April 4, 2013 **
iperf display implemented
- scaled to 50,000,000
- update rate is every 2s
diff --git a/web/ons-demo/js/app.js b/web/ons-demo/js/app.js
index d6fa983..6176c3a 100644
--- a/web/ons-demo/js/app.js
+++ b/web/ons-demo/js/app.js
@@ -261,17 +261,18 @@
var duration = 10000; // seconds
var interval = 100; // ms. this is defined by the server
var updateRate = 2000; // ms
+ var pointsToDisplay = 1000;
function makePoints() {
var pts = [];
var i;
- for (i=0; i < 100; ++i) {
+ for (i=0; i < pointsToDisplay; ++i) {
var sample = flow.iperfData.samples[i];
var height = 32 * sample/50000000;
if (height > 32)
height = 32;
pts.push({
- x: i * 1000/99,
+ x: i * 1000/(pointsToDisplay-1),
y: 32 - height
})
}
@@ -283,7 +284,7 @@
startIPerf(flow, duration, updateRate/interval);
flow.iperfDisplayInterval = setInterval(function () {
if (flow.iperfData) {
- while (flow.iperfData.samples.length < 100) {
+ while (flow.iperfData.samples.length < pointsToDisplay) {
flow.iperfData.samples.push(0);
}
var iperfPath = d3.select(document.getElementById(makeSelectedFlowKey(flow))).select('path');
@@ -301,7 +302,7 @@
samples: []
};
var i;
- for (i = 0; i < 100; ++i) {
+ for (i = 0; i < pointsToDisplay; ++i) {
flow.iperfData.samples.push(0);
}
}
diff --git a/web/ons-demo/js/controller.js b/web/ons-demo/js/controller.js
index c7c80ec..a6c7843 100644
--- a/web/ons-demo/js/controller.js
+++ b/web/ons-demo/js/controller.js
@@ -3,7 +3,7 @@
function callURL(url, cb) {
d3.text(url, function (error, result) {
if (error) {
- alert(url + ' : ' + error.status);
+ console.log(url + ' : ' + error.status);
} else {
if (cb) {
cb(result);