This repository has been archived by the owner on Dec 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
win8.html
258 lines (239 loc) · 11.3 KB
/
win8.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<!DOCTYPE html>
<html lang="en">
<head>
<style>
#data td { width:100px; word-wrap:break-word; padding:5px}
#data td:first-child { width:200px; word-wrap:break-word; padding:5px}
</style>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/menu.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/custom.css">
<script src="js/jquery.js"></script>
<script src="js/AddCommentUI.js"></script>
<script src="js/alerts.js"></script>
<script type="text/javascript">
function addMergedAlertToUI(tbl, alert, showall, rev) {
var fields = ["push_date", "branch", "test", "platform", "percent", "reference", "investigate", "status"] //fields have been changed to adjust the cell elements.
if(rev != "")
document.getElementById("jump").innerHTML="<h5><a href="+root_url+"/alerts.html?rev="+rev+"&table=1>Toggle View</a></h5>";
var cname = "data";
if (alert["mergedfrom"] != "" && alert["mergedfrom"] != undefined) {
cname = "mergeddata";
}
if (parseInt(alert["percent"]) > 0) {
if (showall != 1) {
return 0;
}
cname = "improvement";
}
var row = tbl.insertRow(-1);
row.id = alert["id"] + "-";
var rev = row.insertCell(0);
for (var i = 0; i < fields.length; i++) {
var test = fields[i];
cell = row.insertCell(-1);
cell.className = cname;
cell.setAttribute('field_name', fields[i]);
cell.onclick = editAlert(alert["id"], alert["body"]);
var value = alert[test];
if (fields[i] == "reference") {
value = "<p><a href=\"" + alert['graphurl'] + "\">" + 'graphurl' + "</a></p>"+ "<p><a href=\"" + alert['changeset'] + "\">" + 'changeset' + "</a></p>";
cell.onclick = "";
} else if (fields[i] == "status") {
value = "<select class='form-control' id=\"" + alert["id"] + "-status\" onChange=\"updateStatus(" + alert['id'] + ", '" + alert['duplicate'] + "', '" + alert['bug'] + "', '" + alert['mergedfrom'] + "');\">";
var options = ["NEW", "Back Filling", "Investigating", "Duplicate", "Resolved", "Shipped", "Wont Fix", "False Alarm", "Ignore", "Not Tracking", "Backout", "Too Low"];
for (var j = 0; j < options.length; j++) {
value += "<option ";
if (alert['status'] == options[j]) {
value += "selected";
}
value += ">" + options[j] + "</option>";
}
value += "</select>";
cell.onclick = "";
} else if (fields[i] == "investigate") {
var investigate = '';
var defaultValue = "<p><a href=\"#\" onClick=\"updateBug(" + alert['id'] + ", '" + alert['bug'] + "', '" + alert['status'] + "');\">add bug #</a></p>";
if (nvl(alert['bug'], "") != "") {
var bugz = alert['bug'].split(',');
defaultValue = "";
for (var b = 0; b < bugz.length; b++) {
var bugid = bugz[b].trim();
defaultValue += "<a href=\"https://bugzilla.mozilla.org/show_bug.cgi?id=" + bugid + "\">" + bugid + "</a>";
defaultValue += "<a href=\"#\" onClick=\"updateBug(" + alert['id'] + ", '" + alert['bug'] + "', '" + alert['status'] + "');\"> + </a><br />";
}
}
investigate += defaultValue;
defaultValue = "<p><a href=\"#\" onClick=\"updateTbplURL(" + alert['id'] + ", '" + alert['tbplurl'] + "');\">add tbpl link</a></p>";
if (alert['tbplurl'] != "") {
if (!(alert['branch'].endsWith("Non-PGO")) && (alert['tbplurl'] != null)) {
var url = alert['tbplurl'].split("talos");
alert['tbplurl'] = url[0] + "pgo%20talos" + url[1];
defaultValue = "<p><a href=\"" + alert['tbplurl'] + "\">tbplurl</a><p>";
} else {
defaultValue = "<p><a href=\"" + alert['tbplurl'] + "\">tbplurl</a></p>";
}
defaultValue = "<a href=\"" + alert['tbplurl'] + "\">tbplurl</a>";
}
investigate += defaultValue;
value = investigate;
cell.onclick = "";
}
textNode = value || 0;
cell.innerHTML = textNode;
}
return 1
}
var results;
$(document).ready(function () {
// parse get parameters
document.title = 'Talos Alerts';
results = getJsonFromUrl();
var showAll = 1;
if (parseInt(results['showAll']) != 1) {
showAll = 0;
}
var rev = results['rev'];
if (!rev) {
rev = "";
}
var test = getCookie("test");
if (!test) {
test = "";
}
var platform = getCookie("platform");
if (!platform) {
platform = "";
}
var current = "true";
document.cookie = "platform =; expires=Thu, 01 Jan 1970 00:00:00 GMT";
document.cookie = "test =; expires=Thu, 01 Jan 1970 00:00:00 GMT";
loadSelectors();
var show_improvement = results['show_improvement'];
if (show_improvement != 0)
show_improvement = 1;
if (results['table'] == 1)
loadAllAlertsTable_win8(showAll, rev, test, platform, current, show_improvement);
else
loadAllAlerts_win8(showAll, rev, test, platform, current);
});
</script>
</head>
<body class="noscript">
<div class="container-fluid">
<div text-align="center">
<div class="table-responsive">
<table class="table table-hover">
<tr>
<td><a href="http://54.215.155.53:8080/alerts.html">Alerts</a></td>
<td></td>
<td><a href="http://54.215.155.53:8080/expired.html">Expired alerts</a></td>
<td></td>
<td><a href="http://54.215.155.53:8080/report.html">Reports</a></td>
</tr>
</table>
</div>
</div>
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="alerts.html">Talos Alert Manager</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav top-nav">
<li class="dropdown">
<select class="form-control" id="rev">
<option value="">Select Revision</option>
</select>
</li>
<li class="dropdown">
<select class="form-control" id="test">
<option value="">Select Test</option>
</select>
</li >
<li class="dropdown">
<select class="form-control" id="platform">
<option value="">Select Platform</option>
</select>
</li>
<li >
<u>ShowAll</u>
<input type="checkbox" id="checkbox" Value="Show All"/>
<input type="button" class="btn btn-primary" class="button" id="button" type="button" value="Filter"/>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
<div id = "jump" align = "right"></div>
<div id="revisions">
</div>
<div id="addDuplicatePopup" class="popupForm" style="display: none;">
<a class="closePopup" href="javascript:hideDiv('addDuplicatePopup');">close</a>
<form id="addDuplicateForm">
<h2>Mark as duplicate of original revision</h2>
<p>
<input required type="text" id="logDuplicateText" value="">
<input type="submit" value="Mark as Duplicate">
</form>
</div>
<div id="addBugPopup" class="popupForm" style="display: none;">
<a class="closePopup" href="javascript:hideDiv('addBugPopup');">close</a>
<form id="addBugForm">
<h2>Bug that tracks this regression</h2>
<p>
<input required type="text" id="logBugText" value="">
<input type="hidden" id="logBugStatusText" value="">
<input type="submit" value="Add Bug">
</form>
</div>
<div id="addTBPLPopup" class="popupForm" style="display: none;">
<a class="closePopup" href="javascript:hideDiv('addTBPLPopup');">close</a>
<form id="addTBPLForm">
<h2>Link to TBPL view of jobs</h2>
<p>
<input required type="text" id="logTbplText" value="">
<input type="submit" value="Add Link">
</form>
</div>
<div id="addNotePopup" class="popupForm" style="display: none;">
<a class="closePopup" href="javascript:hideDiv('addNotePopup');">close</a>
<form id="addNoteForm">
<h2>Add a Comment</h2>
<table>
<tr>
<th><label for="logNoteEmail">Name/nick:</label></th>
<td><input required type="text" id="logNoteEmail" value=""></td>
</tr>
<tr>
<th><label for="logNoteText">Comment:</label></th>
<td><textarea required cols="40" rows="5" id="logNoteText"></textarea></td>
</tr>
</table>
<p><input type="submit" value="Add Comment">
</form>
</div>
</div>
<div id="hide" align="left"></div>
<div id="revision" align="center"></div>
<div align="center">
<table class="sortable" id="data" border="1">
<tr>
</tr>
</table>
</div>
<div align="center">
<table id="detail">
<tr>
</tr>
</table>
</div>
<p id="warn" align="center"></p>
</body>
</html>