blob: 619d67774437c7329430de9d6533a59f4d644994 [file] [log] [blame]
<html>
<head>
<title>Ignite Teamcity - 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.2.js"></script>
</head>
<body>
<script>
var g_shownDataHashCodeHex = "";
$(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});
$( "#tagSelect" ).change(function() {
var selectedTag = $( "#tagSelect option:selected" ).val()
$( ".suiteBlock" ).each(function() {
if(selectedTag == 'all' || $(this).find(".buildTag:contains('" + selectedTag +"')").length > 0)
$(this).show();
else
$(this).hide();
})
});
});
function parmsForRest() {
var curReqParms = "";
var branch = findGetParameter("branch");
if (branch != null)
curReqParms += "?branch=" + branch;
var count = findGetParameter("count");
if (count != null)
curReqParms += "&count=" + count;
var checkAllLogs = findGetParameter("checkAllLogs");
if (checkAllLogs != null)
curReqParms += "&checkAllLogs=" + checkAllLogs;
return curReqParms;
}
function checkForUpdate() {
var curFailuresUrl = "rest/tracked/mergedUpdates" + parmsForRest();
$.ajax({
url: curFailuresUrl,
success: function (result) {
if (g_shownDataHashCodeHex !== "" && isDefinedAndFilled(result.hashCodeHex)) {
if (g_shownDataHashCodeHex === result.hashCodeHex) {
setTimeout(checkForUpdate, 10000);
$("#loadStatus").html("");
} else {
loadData(); // data changed, show new
}
} else {
loadData();
}
},
error: showErrInLoadStatus
});
}
function loadData() {
var curFailuresUrl = "rest/tracked/mergedResults" + parmsForRest();
$("#loadStatus").html("<img src='https://www.wallies.com/filebin/images/loading_apple.gif' width=20px height=20px> Please wait. Loading merged runs may require significant time.");
setTimeout(loadPartialData, 3000);
$.ajax({
url: curFailuresUrl,
success: function (result) {
showData(result);
g_shownDataHashCodeHex = isDefinedAndFilled(result.hashCodeHex) ? result.hashCodeHex : "";
},
error: showErrInLoadStatus
});
}
function loadPartialData() {
var curFailuresUrl = "rest/tracked/mergedResultsNoSync" + 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 repMode = "./all.html" + parmsForRest() + "&reportMode=" + true;
$("#divFailures").html(showChainOnServersResults(result)
+ " <a href='" + repMode + "'>report mode</a>");
refillTagSelect();
}
function refillTagSelect() {
var newTagList = new Set();
$("div#divFailures table tr td span.buildTag").each(function(){
newTagList.add(this.innerText);
})
var tagSelect = $("#tagSelect");
tagSelect.empty();
tagSelect.append(
$("<option></option>")
.attr("value", "all")
.text("All")
);
newTagList.forEach(function(key) {
tagSelect.append(
$("<option></option>")
.attr("value", key)
.text(key)
);
});
}
</script>
<script>
window.location='current.html' + parmsForRest() + "&count=10";
</script>
<a href="current.html?count=10">This repors functionality was moved here</a>
<div id="loadStatus"></div>
<div><a href=".">Home</a> <select id="tagSelect" style="float:right"></select></div>
<br/>
<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>