| <html> |
| <head> |
| <title>Apache Ignite Teamcity Bot - Tracked Branches selection</title> |
| <link rel="icon" href="img/leaf-icon-png-7066.png"> |
| |
| <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> |
| |
| <link rel="stylesheet" href="css/style-1.5.css"> |
| |
| <script src="https://code.jquery.com/jquery-1.12.4.js"></script> |
| <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> |
| |
| <script src="js/common-1.6.js"></script> |
| <script> |
| $(document).ready(function() { |
| $.getScript("js/common-1.6.js", function(data, textStatus, jqxhr){ }); |
| |
| $( document ).tooltip(); |
| loadData(); |
| }); |
| |
| function loadData() { |
| $("#loadStatus").html("<img src='https://www.wallies.com/filebin/images/loading_apple.gif' width=20px height=20px> Please wait"); |
| |
| $.ajax({ |
| url: "rest/branches/version", |
| success: showVersionInfo, |
| error: showErrInLoadStatus |
| }); |
| |
| $.ajax({ |
| url: "rest/branches/getIds", |
| success: function(result) { |
| $("#loadStatus").html(""); |
| showTrackedBranchesLinks(result); |
| |
| $.ajax({ |
| url: "rest/tracked/summary", |
| success: function(result) { |
| $("#loadStatus").html(""); |
| showTrackedBranchesLinks2(result); |
| }, |
| error: showErrInLoadStatus |
| }); |
| }, |
| error: showErrInLoadStatus |
| }); |
| |
| |
| |
| } |
| |
| function showTrackedBranchesLinks2(result) { |
| var res = "<table >"; |
| res+="<tr><td>Branch name</td><td>Report</td><td>Merged 10</td><td>Finished last day</td><td>Running</td><td>Queued</td></tr>"; |
| for (var i = 0; i < result.length; i++) { |
| let summary = result[i]; |
| var id = summary.name; |
| res += "<tr>"; |
| res += "<td align='right'>" + id + ":</td>"; |
| res += "<td>" + "<a href='current.html?branch=" + id + "'><button>Latest (" + id + ")</button></a>" + "</td>"; |
| res += "<td>" + " <a href='current.html?branch=" + id + "&count=10'><button title='Failures from last 10 runs merged'>History (" + id + ")</button></a>" + "</td>"; |
| |
| res += "<td>" + JSON.stringify(summary.finishedLastDay)+ "</td>"; |
| res += "<td>" + JSON.stringify(summary.runningList)+ "</td>"; |
| res += "<td>" + JSON.stringify(summary.queuedList)+ "</td>"; |
| res += "</tr>"; |
| } |
| |
| res += "</table>"; |
| |
| |
| $("#branchesStatus").html(res); |
| } |
| |
| function showTrackedBranchesLinks(result) { |
| var res = "<table>"; |
| res+="<tr><td>Branch name</td><td>Report</td><td>Merged 10</td><td>Finished last day</td><td>Running</td><td>Queued</td></tr>"; |
| |
| for (var i = 0; i < result.length; i++) { |
| var id = result[i]; |
| res += "<tr>"; |
| res += "<td align='right'>" + id + ":</td>"; |
| res += "<td>" + "<a href='current.html?branch=" + id + "'><button>Latest (" + id + ")</button></a>" + "</td>"; |
| res += "<td>" + " <a href='current.html?branch=" + id + "&count=10'><button title='Failures from last 10 runs merged'>History (" + id + ")</button></a>" + "</td>"; |
| res += "</tr>"; |
| } |
| |
| res += "</table>"; |
| |
| |
| $("#branchesStatus").html(res); |
| } |
| |
| </script> |
| </head> |
| <body> |
| <div class="formgroup"> |
| Monitoring. Current Failed Tests: <br> |
| <div id="branchesStatus"></div> |
| </div> |
| <br> |
| |
| <div id="loadStatus"></div> |
| <div id="version"></div> |
| |
| </body> |
| </html> |