summaryrefslogtreecommitdiffstats
path: root/web/topchanges
diff options
context:
space:
mode:
Diffstat (limited to 'web/topchanges')
-rw-r--r--web/topchanges/index.shtml45
-rw-r--r--web/topchanges/main.js61
2 files changed, 3 insertions, 103 deletions
diff --git a/web/topchanges/index.shtml b/web/topchanges/index.shtml
index 03623b6..c145bdc 100644
--- a/web/topchanges/index.shtml
+++ b/web/topchanges/index.shtml
@@ -108,51 +108,10 @@ combinations.
<td valign="top" style="border:0">
<!-- BEGIN Test case filter -------------------------------------------- -->
-
-<table style="border:0">
-<tr>
-<td style="border:0">
-<fieldset>
-<legend style="font-size:16px; font-weight:bold">Test Cases</legend>
-
-<table style="border:0">
-<tr>
-<td style="border:0; background-color:#eee">
-Only benchmarks matching the selected test cases are considered (<b>note:</b>
-selecting none is equivalent to selecting all).
-</td>
-</tr>
-</table>
-
-<div id="div_testCaseFilter_hidden" style="display:block">
-<a id="link_testCaseFilter" href="javascript::void(0)"
- style="text-decoration:none" onclick="toggleTestCaseFilter()">show</a>
-</div> <!-- div_testCaseFilter_hidden -->
-
-<div id="div_testCaseFilter_shown" style="display:none">
-<a id="link_testCaseFilter" href="javascript::void(0)"
- style="text-decoration:none" onclick="toggleTestCaseFilter()">hide</a>
-&nbsp;&nbsp;&nbsp;
-<a href="javascript::void(0)" style="text-decoration:none"
- onclick="$('#test_cases input').attr('checked', true); return false;">
- select all</a>
-&nbsp;&nbsp;&nbsp;
-<a href="javascript::void(0)" style="text-decoration:none"
- onclick="$('#test_cases input').attr('checked', false); return false;">
- clear all</a>
-
-<table id="test_cases">
-</table>
-
-</div> <!-- div_testCaseFilter_shown -->
-
-</fieldset>
-</td>
-</tr>
-</table>
-
+<!--#include virtual="../global/tcfilter.html" -->
<!-- END Test case filter -------------------------------------------- -->
</td>
+
</tr>
</table>
diff --git a/web/topchanges/main.js b/web/topchanges/main.js
index cb9a208..dbc4fc0 100644
--- a/web/topchanges/main.js
+++ b/web/topchanges/main.js
@@ -10,66 +10,8 @@ var sha1s = null;
var benchmarks = null;
var metrics = null;
-// Test cases with changes:
-var testCases = null;
-
// --- END Global variables -------------------------------------
-function toggleTestCaseFilter() {
- var divObj_hidden = $("#div_testCaseFilter_hidden");
- var divObj_shown = $("#div_testCaseFilter_shown");
- if (divObj_shown.css("display") == "none") {
- divObj_shown.css("display", "block");
- divObj_hidden.css("display", "none");
- } else {
- divObj_shown.css("display", "none");
- divObj_hidden.css("display", "block");
- }
-}
-
-
-function updateTestCaseTable() {
-
- // Clear table:
- $("#test_cases tr").remove();
-
- // Populate table:
-
- var nc = 8; // # of columns
- var nr = Math.ceil(testCases.length / nc); // # of rows
- var c1 = testCases.length % nc; // lowest column index for empty bottom cell
-
- var html = "";
- for (r = 0; r < nr; ++r) {
- if ((r < (nr - 1)) || (nc > 1))
- html += "<tr>";
- for (c = 0; c < nc; ++c) {
- if ((r == (nr - 1)) && (c >= c1) && (!(nc == 1))) {
- html += "<td></td>"; // Fill in empty bottom cell
- } else {
- var index = -1;
- if (c <= c1)
- index = r + c * nr;
- else
- index = r + c1 * nr + (c - c1) * (nr - 1);
-
- var name = testCases[index];
- html += "<td style=\"white-space: nowrap\">";
- html += "<input type=\"checkbox\" id=\"tc" + index + "\" " +
- "name=\"" + name + "\"/>";
- html += "<label for=\"tc" + index + "\">" + name +
- "</label>";
- html += "</td>";
- }
- }
- if ((r < (nr - 1)) || (nc > 1))
- html += "</tr>";
- }
-
- $("#test_cases").append(html);
-}
-
-
// ### 2 B DOCUMENTED!
function timeSeriesURL(
database, hostId, platformId, branchId, sha1Id, benchmarkId, metricId,
@@ -307,7 +249,6 @@ function fetchNameMappings() {
benchmarks = data.benchmarks;
metrics = data.metrics;
- updateTestCaseTable();
updateMainTable();
}
}
@@ -363,7 +304,7 @@ function fetchTestCases() {
updateStatus("fetching test cases ... done", false);
updateStatus("", false);
- testCases = data.testCases;
+ updateTestCaseTable("#test_cases", data.testCases, 8);
fetchNameMappings();
}