| Index: LayoutTests/fast/harness/archived-results-dashboard.html
|
| diff --git a/LayoutTests/fast/harness/archived-results-dashboard.html b/LayoutTests/fast/harness/archived-results-dashboard.html
|
| index 56c0528419ac5986dfca36371eaafa4cdb19ab82..f93afb5ca069434017034b8e98b03c9961b06823 100644
|
| --- a/LayoutTests/fast/harness/archived-results-dashboard.html
|
| +++ b/LayoutTests/fast/harness/archived-results-dashboard.html
|
| @@ -1,10 +1,12 @@
|
| <!DOCTYPE html>
|
| <style>
|
| +
|
| html {
|
| height: 100%;
|
| }
|
| +
|
| body {
|
| - margin: 0;
|
| + margin: 1.0em;
|
| font-family: Helvetica, sans-serif;
|
| font-size: 11pt;
|
| display: -webkit-flex;
|
| @@ -18,58 +20,127 @@ body > * {
|
| }
|
|
|
| h1 {
|
| - font-size: 14pt;
|
| + font-size: 150%;
|
| margin-top: 1.5em;
|
| text-align: center;
|
| - text-decoration: underline;
|
| }
|
|
|
| a {
|
| text-decoration: none;
|
| }
|
|
|
| -tr {
|
| - background-color: white;
|
| +table {
|
| + position: relative;
|
| + top: 100px;
|
| }
|
|
|
| -tr:hover {
|
| - background-color: #999999;
|
| +th {
|
| + background: rgb(200, 200, 200);
|
| + border-radius: 5px;
|
| }
|
|
|
| td {
|
| padding: 1px 4px;
|
| - valign: center;
|
| + vertical-align: middle;
|
| + min-width: 20px;
|
| + height: 25px;
|
| + border: 1px solid rgb(200, 200, 200);
|
| + border-radius: 5px;
|
| }
|
|
|
| -td:hover .note{
|
| - display: block;
|
| +input[type=text] {
|
| + border: 2px solid rgb(128, 128, 128);
|
| + font-size: 120%;
|
| + height: 30px;
|
| + margin-bottom: 1.0em;
|
| + margin-top: 1.0em;
|
| + margin-left: 1.0em;
|
| + padding-left: 0.8em;
|
| + width: 500px;
|
| +}
|
| +
|
| +input[type=checkbox] {
|
| + padding: 0.1em;
|
| + width: 20px;
|
| + height: 20px;
|
| +}
|
| +
|
| +.rerun-button {
|
| + background: rgb(66, 184, 221);
|
| + border-radius: 5px;
|
| + font-size: 120%;
|
| + height: 40px;
|
| + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
| + width: 150px;
|
| +}
|
| +
|
| +.rerun-button:hover {
|
| + background: rgb(80, 200, 250);
|
| +}
|
| +
|
| +.result-cell, .test-pass, .test-fail, .test-skip, .test-run{
|
| + border: 0px;
|
| + border-radius: 5px;
|
| }
|
|
|
| .test-pass {
|
| - background-color:rgb(0,255,0);
|
| + background-color: rgb(143, 223, 95);
|
| }
|
|
|
| .test-fail {
|
| - background-color:rgb(255,0,0);
|
| + background-color: rgb(233, 128, 128);
|
| }
|
|
|
| .test-skip {
|
| - background-color:rgb(255,255,255);
|
| + background-color: rgb(255, 255, 255);
|
| }
|
| +
|
| .test-run {
|
| - background-color:rgb(255,252,108);
|
| + background-color: rgb(255, 252, 108);
|
| }
|
| +
|
| .log {
|
| - font-family: "Courier New"
|
| + font-family: "Courier New";
|
| + display: block;
|
| + position: relative;
|
| }
|
| +
|
| .stdio-href {
|
| color: grey;
|
| font-weight: bold;
|
| text-decoration: underline;
|
| }
|
| +
|
| .stdio-href:hover {
|
| color:black;
|
| }
|
| +
|
| +.odd-row {
|
| + background: rgb(66, 184, 221);
|
| +}
|
| +
|
| +.even-row {
|
| + background: rgb(200, 200, 200);
|
| +}
|
| +
|
| +.toolbox {
|
| + display: block;
|
| + position: fixed;
|
| + padding: 4px;
|
| + top: 10px;
|
| + right: 10px;
|
| + z-index: 9999;
|
| +}
|
| +
|
| +.toolbox span {
|
| + color: rgb(104, 104, 104);
|
| + position: absolute;
|
| + text-align: right;
|
| + top: 30px;
|
| + left: 570px;
|
| + width: 100px;
|
| +}
|
| +
|
| </style>
|
| <script>
|
| var g_state;
|
| @@ -94,6 +165,10 @@ function processGlobalStateFor(testObject)
|
| {
|
| var table = document.getElementById('results-table');
|
| var row = table.insertRow(-1);
|
| + if (table.rows.length % 2 == 0)
|
| + row.className = 'even-row';
|
| + else
|
| + row.className = 'odd-row';
|
| var checkboxcell = row.insertCell(-1);
|
| var checkbox = document.createElement("input");
|
| checkbox.setAttribute('type','checkbox');
|
| @@ -111,7 +186,7 @@ function processGlobalStateFor(testObject)
|
| cell.className = 'test-fail';
|
| var hrefElement = document.createElement("a");
|
| hrefElement.href = globalState().results.result_links[result];
|
| - hrefElement.innerHTML = ' ';
|
| + hrefElement.innerHTML = ' ';
|
| cell.appendChild(hrefElement);
|
| }
|
|
|
| @@ -139,7 +214,7 @@ function getTests()
|
| var tests_list = {
|
| tests : []
|
| };
|
| - for(var i = 1; i < testCount; i++) {
|
| + for(var i = 2; i < testCount; i++) {
|
| var selected = table.rows[i].cells[0].getElementsByTagName("input")[0];
|
| if(selected.checked) {
|
| var test = table.rows[i].cells[1].innerHTML;
|
| @@ -158,6 +233,7 @@ function rerun()
|
| var stdioIframe = document.createElement("IFRAME");
|
| stdioIframe.style.display = 'none';
|
| stdioIframe.width = window.innerWidth;
|
| + stdioIframe.height = '100px';
|
| stdioIframe.onload = function () {
|
| stdioIframe.contentWindow.scrollTo(0,stdioIframe.contentWindow.document.body.scrollHeight);
|
| }
|
| @@ -204,34 +280,85 @@ function checkalltests()
|
| var value = document.getElementById("check_all").checked;
|
| var table = document.getElementById("results-table");
|
| var length = table.rows.length;
|
| - for (var i = 1; i < length; i++) {
|
| + for (var i = 2; i < length; i++) {
|
| var checkbox = table.rows[i].cells[0].getElementsByTagName("input")[0];
|
| + var disabled = checkbox.disabled;
|
| + if(!disabled)
|
| checkbox.checked = value;
|
| }
|
|
|
| }
|
|
|
| -function generatePage()
|
| +function searchTable(filterExp)
|
| {
|
| - var count = globalState().results.result_links.length;
|
| - var tableHeader= '<div><table id=results-table><thead><tr>' +
|
| - '<th>' + '<input type="checkbox" name="checkall" id="check_all" onclick="checkalltests()"></input>' + ' Rerun' + '</th>' +
|
| + var table = document.getElementById('results-table');
|
| + var testCount = table.rows.length;
|
| + var tests_list = {
|
| + tests : []
|
| + };
|
| + var searchCount = 0;
|
| + for(var i = 2; i < testCount; i++) {
|
| + var cellContent = table.rows[i].cells[1].innerHTML;
|
| + var checkbox = table.rows[i].cells[0].getElementsByTagName("input")[0];
|
| + var index = cellContent.search(filterExp);
|
| + if (index < 0) {
|
| + table.rows[i].style.display = 'none';
|
| + checkbox.checked = false;
|
| + checkbox.disabled = true;
|
| + }
|
| + else {
|
| + table.rows[i].style.display = '';
|
| + checkbox.disabled = false;
|
| + searchCount += 1;
|
| + }
|
| + }
|
| + return searchCount;
|
| +}
|
| +function applyfilter()
|
| +{
|
| + var filterString = document.getElementById('applyfilter').value;
|
| + var searchCount = document.getElementById('searchcount');
|
| + var filterExp = new RegExp(filterString, "i");
|
| + var count = searchTable(filterExp);
|
| + if(filterString == '') {
|
| + searchCount.innerHTML = '';
|
| + return;
|
| + }
|
| + var totalCount = document.getElementById('results-table').rows.length - 2;
|
| + searchCount.innerHTML = count + '/' + totalCount;
|
| +}
|
|
|
| - '<th>Failing Tests ( Latest → Oldest )</th>';
|
| +function createTableHeader()
|
| +{
|
| + var count = globalState().results.result_links.length;
|
| + var tableHeader= '<table id=results-table><thead><tr>' +
|
| + '<th rowspan="2">' +
|
| + '<input type="checkbox" name="checkall" id="check_all" onclick="checkalltests()"></input>' +
|
| + '</th>' +
|
| + '<th rowspan="2" text-align:left;>Tests</th>' +
|
| + '<th colspan= '+ count +'>Latest → Oldest</th> </tr><tr>';
|
| for( var i = 0; i < count; i++)
|
| tableHeader += '<th>'+ (i+1) +'</th>';
|
| - tableHeader += '</thead>';
|
| + tableHeader += '</tr></thead></table>';
|
| document.body.innerHTML += tableHeader;
|
| - document.body.innerHTML += '</table></div>';
|
| +}
|
|
|
| +function generatePage()
|
| +{
|
| + createTableHeader();
|
| forEachTest(processGlobalStateFor);
|
| }
|
| +
|
| </script>
|
| <!-- To run the tests -->
|
| <script src="resources/archived-results-dashboard-test.js"></script>
|
| <body onload="generatePage()">
|
| <h1>Dashboard</h1>
|
| <div id=log class="log"></div>
|
| - <p><button onclick="rerun()">Re Run Tests</button></p>
|
| + <div class="toolbox">
|
| + <button onclick=rerun() class="rerun-button">Re Run Tests</button>
|
| + <input type="text" id=applyfilter oninput="applyfilter()" placeholder="Search via regular expression"></input>
|
| + <span id=searchcount></span>
|
| + </div>
|
| </body>
|
| </html>
|
|
|