Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r1074 committed - Improve advanced page (JS UI)

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r1074 committed - Improve advanced page (JS UI)


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r1074 committed - Improve advanced page (JS UI)
  • Date: Mon, 09 Jun 2014 15:41:52 +0000

Revision: 1074
Author:

Date: Mon Jun 9 15:41:34 2014 UTC
Log: Improve advanced page (JS UI)
http://code.google.com/p/ndt/source/detail?r=1074

Modified:
/branches/Issue133/Applet/src/edu/internet2/ndt/Tcpbw100.java
/branches/Issue133/HTML5-frontend/script.js

=======================================
--- /branches/Issue133/Applet/src/edu/internet2/ndt/Tcpbw100.java Wed May 28 11:17:18 2014 UTC
+++ /branches/Issue133/Applet/src/edu/internet2/ndt/Tcpbw100.java Mon Jun 9 15:41:34 2014 UTC
@@ -2961,6 +2961,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();
=======================================
--- /branches/Issue133/HTML5-frontend/script.js Fri Mar 21 10:33:50 2014 UTC
+++ /branches/Issue133/HTML5-frontend/script.js Mon Jun 9 15:41:34 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] r1074 committed - Improve advanced page (JS UI), ndt, 06/09/2014

Archive powered by MHonArc 2.6.16.

Top of Page