ndt-dev - [ndt-dev] [ndt] r1085 committed - Merged Issue133 branch into trunk
Subject: NDT-DEV email list created
List archive
- From:
- To:
- Subject: [ndt-dev] [ndt] r1085 committed - Merged Issue133 branch into trunk
- Date: Wed, 18 Jun 2014 05:36:39 +0000
Revision: 1085
Author:
Date: Wed Jun 18 05:35:22 2014 UTC
Log: Merged Issue133 branch into trunk
http://code.google.com/p/ndt/source/detail?r=1085
Modified:
/trunk
/trunk/Applet/src/edu/internet2/ndt/Tcpbw100.java
/trunk/HTML5-frontend/script.js
=======================================
--- /trunk/Applet/src/edu/internet2/ndt/Tcpbw100.java Wed Jun 4 10:51:11 2014 UTC
+++ /trunk/Applet/src/edu/internet2/ndt/Tcpbw100.java Wed Jun 18 05:35:22 2014 UTC
@@ -2966,6 +2966,7 @@
tokens = new StringTokenizer(sTestResParam);
sSysvar = null;
sStrval = null;
+ _txtDiagnosis.append("=== Results sent by the server ===\n");
while (tokens.hasMoreTokens()) {
if (++i % 2 == 1) {
sSysvar = tokens.nextToken();
=======================================
--- /trunk/HTML5-frontend/script.js Wed Jun 18 05:31:12 2014 UTC
+++ /trunk/HTML5-frontend/script.js Wed Jun 18 05:35:22 2014 UTC
@@ -169,7 +169,7 @@
document.getElementById('latency').innerHTML = averageRoundTrip().toPrecision(2);
document.getElementById('jitter').innerHTML = jitter().toPrecision(2);
document.getElementById("test-details").innerHTML = testDetails();
- document.getElementById("test-advanced").innerHTML = testDiagnosis();
+ document.getElementById("test-advanced").appendChild(testDiagnosis());
showPage('results');
break;
@@ -333,8 +333,49 @@
}
function testDiagnosis() {
- if (simulate) return "Test diagnosis";
- return testNDT().get_diagnosis();
+ var div = document.createElement("div");
+
+ if (simulate) {
+ div.innerHTML = "Test diagnosis";
+ return div;
+ }
+
+ var diagnosisArray = testNDT().get_diagnosis().split('\n');
+ var txt = '';
+ var table;
+ var isTable = false;
+
+ diagnosisArray.forEach(
+ function addRow(value) {
+ if (isTable) {
+ rowArray = value.split(':');
+ if (rowArray.length>1) {
+ var row = table.insertRow(-1);
+ rowArray.forEach(
+ function addCell(cellValue, idx) {
+ var cell =row.insertCell(idx);
+ cell.innerHTML = cellValue;
+ }
+ );
+ } else {
+ isTable = false;
+ txt = txt + value;
+ }
+ } else {
+ if (value.indexOf('=== Results sent by the server ===') != -1) {
+ table = document.createElement("table");
+ isTable = true;
+ } else {
+ txt = txt + value + "\n";
+ }
+ }
+ }
+ );
+ txt = txt + "=== Results sent by the server ===";
+ div.innerHTML = txt;
+ div.appendChild(table);
+
+ return div;
}
function testError() {
- [ndt-dev] [ndt] r1085 committed - Merged Issue133 branch into trunk, ndt, 06/18/2014
Archive powered by MHonArc 2.6.16.