-
Notifications
You must be signed in to change notification settings - Fork 22
/
issues.html
98 lines (79 loc) · 2.92 KB
/
issues.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<html>
<head>
<title>Apache Ignite Teamcity Bot - Current issues</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 src="js/issues-1.0.js"></script>
</head>
<body>
<script>
var g_shownDataHashCodeHex = "";
$(document).ready(function() {
$.getScript("js/issues-1.0.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;
}
return curReqParms;
}
function checkForUpdate() {
var issuesUrl = "rest/issues/updates" + parmsForRest();
$.ajax({
url: issuesUrl,
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/issues/list" + parmsForRest();
$("#loadStatus").html("⌛ Please wait");
$.ajax({
url: curFailuresUrl,
success: function (result) {
if (isDefinedAndFilled(result.runningUpdates) && result.runningUpdates > 0) {
setTimeout(checkForUpdate, 3000);
$("#loadStatus").html("⌛ Updating");
} else {
$("#loadStatus").html("");
}
showData(result);
g_shownDataHashCodeHex = isDefinedAndFilled(result.hashCodeHex) ? result.hashCodeHex : "";
},
error: showErrInLoadStatus
});
}
function showData(result) {
$("#divFailures").html(showIssues(result) );
}
</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>