blob: 6d26a445eb2a55800b068a583da6fe0f8c7430b5 [file] [log] [blame]
<html>
<head>
<title>Ignite Teamcity - build 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.2.js"></script>
</head>
<body>
<script>
let g_shownDataHashCodeHex = "";
let g_checkForUpdateSched = false;
$(document).ready(function() {
$.getScript("js/testfails-2.2.js", function(data, textStatus, jqxhr){ });
$( document ).tooltip();
loadData();
$.ajax({ url: "/rest/branches/version", success: showVersionInfo, error: showErrInLoadStatus });
});
function parmsForRest() {
var curReqParms = "";
var buildId = findGetParameter("buildId");
curReqParms += "?buildId=" + buildId;
var serverId = findGetParameter("serverId");
if (serverId != null) {
curReqParms += "&serverId=" + serverId;
}
var checkAllLogs = findGetParameter("checkAllLogs");
if (checkAllLogs != null) {
curReqParms += "&checkAllLogs=" + checkAllLogs;
}
return curReqParms;
}
function checkForUpdate() {
var curFailuresUrl = "/rest/build/failures/updates" + parmsForRest();
g_checkForUpdateSched = false;
$.ajax({
url: curFailuresUrl,
success: function (result) {
if (g_shownDataHashCodeHex !== "" && isDefinedAndFilled(result.hashCodeHex)) {
if (g_shownDataHashCodeHex === result.hashCodeHex) {
if (!g_checkForUpdateSched) {
g_checkForUpdateSched = true;
setTimeout(checkForUpdate, 10000);
}
$("#loadStatus").html("");
} else {
loadData(); // data changed, show new
}
} else {
loadData();
}
},
error: showErrInLoadStatus
});
}
function loadData() {
var curFailuresUrl = "/rest/build/failures" + parmsForRest();
$("#loadStatus").html("&#8987; Please wait");
setTimeout(loadPartialData, 3000);
$.ajax({
url: curFailuresUrl,
success: function (result) {
showData(result);
g_shownDataHashCodeHex = isDefinedAndFilled(result.hashCodeHex) ? result.hashCodeHex : "";
if (!g_checkForUpdateSched) {
g_checkForUpdateSched = true;
setTimeout(checkForUpdate, 10000);
}
},
error: showErrInLoadStatus
});
}
function loadPartialData() {
var curFailuresUrl = "/rest/build/failuresNoSync" + 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/build/failures/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>