blob: 8b61c57729054a477d12109cc6c7dd3864dba8c7 [file] [log] [blame]
<html>
<head>
<title>Apache Ignite Teamcity Bot - PR 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(checkForUpdate, 30000);
var branch = findGetParameter("branch");
$.ajax({ url: "rest/branches/version", success: showVersionInfo, error: showErrInLoadStatus });
});
function parmsForRest() {
var curReqParms = "";
var branchForTc = findGetParameter("branchForTc");
if(branchForTc!=null) {
curReqParms += "?branchForTc=" + branchForTc;
}
var serverId = findGetParameter("serverId");
if(serverId!=null) {
curReqParms += "&serverId=" + serverId;
}
var suiteId = findGetParameter("suiteId");
if(suiteId!=null) {
curReqParms += "&suiteId=" + suiteId;
}
var action = findGetParameter("action");
if(action!=null) {
curReqParms += "&action=" + action;
}
var count = findGetParameter("count");
if(count!=null) {
curReqParms += "&count=" + count;
}
var baseBranchForTc = findGetParameter("baseBranchForTc");
if(baseBranchForTc != null) {
curReqParms += "&baseBranchForTc=" + baseBranchForTc;
}
var checkAllLogs = findGetParameter("checkAllLogs");
if (checkAllLogs != null) {
curReqParms += "&checkAllLogs=" + checkAllLogs;
}
return curReqParms;
}
function checkForUpdate() {
var curFailuresUrl = "rest/pr/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/pr/results" + parmsForRest();
$("#loadStatus").html("<img src='https://www.wallies.com/filebin/images/loading_apple.gif' width=20px height=20px> Please wait. First load of PR run-all data may require significant time.");
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/pr/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) {
$("#divFailures").html(showChainOnServersResults(result));
}
</script>
<div id="loadStatus"></div>
<div><a href=".">Home</a><br></div>
<div id="divFailures"></div>
<div id="version"></div>
<div style="visibility:none"><div id="triggerConfirm" title="Trigger Confirmation"></div><div id="triggerDialog" title="Trigger Result"></div></div>
</body>
</html>