mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 03:37:55 +00:00
kpi: Add links to latest test run info.
For easier click-through to see recent results.
This commit is contained in:
30
gui/kpi.java
30
gui/kpi.java
@@ -154,6 +154,9 @@ public class kpi {
|
|||||||
|
|
||||||
runs.sort(new SortbyDate());
|
runs.sort(new SortbyDate());
|
||||||
|
|
||||||
|
// Link to latest test run that has the test id
|
||||||
|
Hashtable<String, Run> test_id_links = new Hashtable();
|
||||||
|
|
||||||
// We have read everything into memory.
|
// We have read everything into memory.
|
||||||
// For each test, generate data over time.
|
// For each test, generate data over time.
|
||||||
Hashtable<String, History> hist_data = new Hashtable();
|
Hashtable<String, History> hist_data = new Hashtable();
|
||||||
@@ -164,6 +167,7 @@ public class kpi {
|
|||||||
Run run = runs.elementAt(i);
|
Run run = runs.elementAt(i);
|
||||||
Test t = run.findTest(tname);
|
Test t = run.findTest(tname);
|
||||||
if (t != null) {
|
if (t != null) {
|
||||||
|
test_id_links.put(tname, run);
|
||||||
try {
|
try {
|
||||||
History hist = hist_data.get(tname);
|
History hist = hist_data.get(tname);
|
||||||
if (hist == null) {
|
if (hist == null) {
|
||||||
@@ -252,7 +256,13 @@ public class kpi {
|
|||||||
String npngt = hk + "::" + ck + "-thumb.png";
|
String npngt = hk + "::" + ck + "-thumb.png";
|
||||||
png.renameTo(new File(dir + File.separator + npngt));
|
png.renameTo(new File(dir + File.separator + npngt));
|
||||||
|
|
||||||
plots.append("<tr><td>" + hk + "</td><td>" + title + "</td><td><a href=\"" + npng + "\"><img src=\"" + npngt + "\"></a></td></tr>\n");
|
String hk_str = hk;
|
||||||
|
Run last = test_id_links.get(hk);
|
||||||
|
if (last != null) {
|
||||||
|
hk_str = "<a href=\"" + last.getName() + "/" + hk + "/index.html\">" + hk + "</a>";
|
||||||
|
}
|
||||||
|
|
||||||
|
plots.append("<tr><td>" + hk_str + "</td><td>" + title + "</td><td><a href=\"" + npng + "\"><img src=\"" + npngt + "\"></a></td></tr>\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ee) {
|
catch (Exception ee) {
|
||||||
@@ -342,7 +352,13 @@ public class kpi {
|
|||||||
String npngt = hk + "::" + g + "-thumb.png";
|
String npngt = hk + "::" + g + "-thumb.png";
|
||||||
png.renameTo(new File(dir + File.separator + npngt));
|
png.renameTo(new File(dir + File.separator + npngt));
|
||||||
|
|
||||||
groups.append("<tr><td>" + hk + "</td><td>" + title + "</td><td><a href=\"" + npng + "\"><img src=\"" + npngt + "\"></a></td></tr>\n");
|
String hk_str = hk;
|
||||||
|
Run last = test_id_links.get(hk);
|
||||||
|
if (last != null) {
|
||||||
|
hk_str = "<a href=\"" + last.getName() + "/" + hk + "/index.html\">" + hk + "</a>";
|
||||||
|
}
|
||||||
|
|
||||||
|
groups.append("<tr><td>" + hk_str + "</td><td>" + title + "</td><td><a href=\"" + npng + "\"><img src=\"" + npngt + "\"></a></td></tr>\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ee) {
|
catch (Exception ee) {
|
||||||
@@ -353,14 +369,17 @@ public class kpi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String test_bed = "Test Bed";
|
String test_bed = "Test Bed";
|
||||||
|
String last_run = "";
|
||||||
|
|
||||||
boolean cp = true;
|
boolean cp = true;
|
||||||
for (int i = 0; i<runs.size(); i++) {
|
for (int i = 0; i<runs.size(); i++) {
|
||||||
Run run = runs.elementAt(i);
|
Run run = runs.elementAt(i);
|
||||||
test_bed = run.getTestRig();
|
test_bed = run.getTestRig();
|
||||||
runs_rows.append("<tr><td>" + i + "</td><td><a href=\"" + run.getName() + "/index.html\">" + run.getName() + "</a></td><td>" + run.getDate()
|
String row_text = ("<tr><td>" + i + "</td><td><a href=\"" + run.getName() + "/index.html\">" + run.getName() + "</a></td><td>" + run.getDate()
|
||||||
+ "</td><td>" + run.getDutHwVer() + "</td><td>" + run.getDutSwVer()
|
+ "</td><td>" + run.getDutHwVer() + "</td><td>" + run.getDutSwVer()
|
||||||
+ "</td><td>" + run.getDutModelNum() + "</td></tr>\n");
|
+ "</td><td>" + run.getDutModelNum() + "</td></tr>\n");
|
||||||
|
last_run = row_text;
|
||||||
|
runs_rows.append(row_text);
|
||||||
|
|
||||||
if (cp) {
|
if (cp) {
|
||||||
try {
|
try {
|
||||||
@@ -390,6 +409,7 @@ public class kpi {
|
|||||||
line = line.replace("___GROUP_GRAPHS___", groups.toString());
|
line = line.replace("___GROUP_GRAPHS___", groups.toString());
|
||||||
line = line.replace("___DATA_GRAPHS___", plots.toString());
|
line = line.replace("___DATA_GRAPHS___", plots.toString());
|
||||||
line = line.replace("___TEST_RUNS___", runs_rows.toString());
|
line = line.replace("___TEST_RUNS___", runs_rows.toString());
|
||||||
|
line = line.replace("___LATEST_RUN___", last_run);
|
||||||
bw.write(line);
|
bw.write(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,13 @@
|
|||||||
<div class='contentDiv'>
|
<div class='contentDiv'>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
<h3>Latest test run details.</h3>
|
||||||
|
<table border="1" cellpadding="6" cellspacing="0" style="border-top-color: gray; border-top-style: solid; border-top-width: 1px; border-right-color: gray; border-right-style: solid; border-right-width: 1px; border-bottom-color: gray; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: gray; border-left-style: solid; border-left-width: 1px">
|
||||||
|
<tr><th>Test ID</th><th>Test Run</th><th>Date</th><th>DUT Hardware</th><th>DUT Sofware</th><th>DUT Model</th></tr>
|
||||||
|
___LATEST_RUN___
|
||||||
|
</table>
|
||||||
|
<P>
|
||||||
|
|
||||||
|
|
||||||
<h3>Historical graphs for each Data Set Group.</h3>
|
<h3>Historical graphs for each Data Set Group.</h3>
|
||||||
<table border="1" cellpadding="6" cellspacing="0" style="border-top-color: gray; border-top-style: solid; border-top-width: 1px; border-right-color: gray; border-right-style: solid; border-right-width: 1px; border-bottom-color: gray; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: gray; border-left-style: solid; border-left-width: 1px">
|
<table border="1" cellpadding="6" cellspacing="0" style="border-top-color: gray; border-top-style: solid; border-top-width: 1px; border-right-color: gray; border-right-style: solid; border-right-width: 1px; border-bottom-color: gray; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: gray; border-left-style: solid; border-left-width: 1px">
|
||||||
@@ -31,7 +38,7 @@
|
|||||||
</table>
|
</table>
|
||||||
<P>
|
<P>
|
||||||
|
|
||||||
<h3>Individual Test Run Details.</h3>
|
<h3>All Individual Test Run Details.</h3>
|
||||||
<table border="1" cellpadding="6" cellspacing="0" style="border-top-color: gray; border-top-style: solid; border-top-width: 1px; border-right-color: gray; border-right-style: solid; border-right-width: 1px; border-bottom-color: gray; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: gray; border-left-style: solid; border-left-width: 1px">
|
<table border="1" cellpadding="6" cellspacing="0" style="border-top-color: gray; border-top-style: solid; border-top-width: 1px; border-right-color: gray; border-right-style: solid; border-right-width: 1px; border-bottom-color: gray; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: gray; border-left-style: solid; border-left-width: 1px">
|
||||||
<tr><th>Test ID</th><th>Test Run</th><th>Date</th><th>DUT Hardware</th><th>DUT Sofware</th><th>DUT Model</th></tr>
|
<tr><th>Test ID</th><th>Test Run</th><th>Date</th><th>DUT Hardware</th><th>DUT Sofware</th><th>DUT Model</th></tr>
|
||||||
___TEST_RUNS___
|
___TEST_RUNS___
|
||||||
|
|||||||
Reference in New Issue
Block a user