| <html> |
| <head> |
| <title>Apache Ignite Teamcity Bot - Current Failures</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"> |
| <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.2/css/all.css" |
| integrity="sha384-/rXc/GQVaYpyDdyxK+ecHPVYJSN9bmVFBvjA/9eOB+pb3F2w2N6fc5qB9Ew5yIns" crossorigin="anonymous"> |
| |
| <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 src="js/testfails-2.1.js"></script> |
| </head> |
| <body> |
| <script> |
| var g_shownDataHashCodeHex = ""; |
| |
| $(document).ready(function() { |
| $.getScript("js/testfails-2.1.js", function(data, textStatus, jqxhr){ }); |
| |
| $( document ).tooltip(); |
| loadData(); |
| //todo fix setInterval( function() { checkForUpdate(); }, 30000); |
| |
| $.ajax({ url: "rest/branches/version", success: showVersionInfo, error: showErrInLoadStatus }); |
| }); |
| |
| function parmsForRest() { |
| var curReqParms = ""; |
| var branch = findGetParameter("branch"); |
| if (branch != null) { |
| curReqParms += "?branch=" + branch; |
| } |
| |
| var checkAllLogs = findGetParameter("checkAllLogs"); |
| if (checkAllLogs != null) { |
| curReqParms += "&checkAllLogs=" + checkAllLogs; |
| } |
| return curReqParms; |
| } |
| |
| function checkForUpdate() { |
| var curFailuresUrl = "rest/tracked/updates" + parmsForRest(); |
| |
| $.ajax({ |
| url: curFailuresUrl, |
| success: function (result) { |
| if (g_shownDataHashCodeHex !== "" && isDefinedAndFilled(result.hashCodeHex)) { |
| if (g_shownDataHashCodeHex === result.hashCodeHex) { |
| var fastCheckNeeded = isDefinedAndFilled(result.runningUpdates) && result.runningUpdates > 0; |
| var ms = fastCheckNeeded ? 3000 : 30000; |
| |
| setTimeout(checkForUpdate, ms); |
| |
| $("#loadStatus").html(""); |
| } else { |
| loadData(); // data changed, show new |
| } |
| } else { |
| loadData(); |
| } |
| }, |
| error: showErrInLoadStatus |
| }); |
| } |
| |
| function loadData() { |
| var curFailuresUrl = "rest/tracked/results" + parmsForRest(); |
| |
| $("#loadStatus").html("<img src='https://www.wallies.com/filebin/images/loading_apple.gif' width=20px height=20px> Please wait"); |
| setTimeout(loadPartialData, 3000); |
| $.ajax({ |
| url: curFailuresUrl, |
| success: function (result) { |
| if (isDefinedAndFilled(result.runningUpdates) && result.runningUpdates > 0) { |
| setTimeout(checkForUpdate, 3000); |
| |
| $("#loadStatus").html("<img src='https://www.wallies.com/filebin/images/loading_apple.gif' width=20px height=20px> Updating"); |
| } else { |
| $("#loadStatus").html(""); |
| } |
| showData(result); |
| g_shownDataHashCodeHex = isDefinedAndFilled(result.hashCodeHex) ? result.hashCodeHex : ""; |
| }, |
| error: showErrInLoadStatus |
| }); |
| } |
| |
| function loadPartialData() { |
| var curFailuresUrl = "rest/tracked/resultsNoSync" + parmsForRest(); |
| |
| if (g_shownDataHashCodeHex !== "") { |
| return; |
| } |
| $.ajax({ |
| url: curFailuresUrl, |
| success: function (result) { |
| if (g_shownDataHashCodeHex !== "") { |
| return; |
| } |
| |
| var validResult = true; |
| for (var i = 0; i < result.servers.length; i++) { |
| var server = result.servers[i]; |
| |
| if (isDefinedAndFilled(server.buildNotFound) && server.buildNotFound) { |
| validResult = false; |
| break; |
| } |
| } |
| if (validResult) |
| showData(result); |
| |
| setTimeout(loadPartialData, 3000); |
| }, |
| error: showErrInLoadStatus |
| }); |
| } |
| |
| function showData(result) { |
| //var txtUrl = "rest/tracked/results/txt" + parmsForRest(); |
| |
| $("#divFailures").html(showChainOnServersResults(result)); |
| // + " <a href='"+ txtUrl + "'>txt</a>"); |
| } |
| |
| </script> |
| |
| <div id="loadStatus"></div> |
| <div><a href=".">Home</a><br></div> |
| <div id="divFailures"></div> |
| |
| <div id="version"></div> |
| <div style="visibility:hidden;"><div id="triggerConfirm" title="Trigger Confirmation"></div><div id="triggerDialog" title="Trigger Result"></div></div> |
| </body> |
| </html> |