Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: appengine/findit/templates/build_failure.html

Issue 1652603003: [Findit] Modify result page to display tryjob result for test failure. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@1228-try-job-pipeline-for-test-failure
Patch Set: . Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <head> 2 <head>
3 <title>Build Failure</title> 3 <title>Build Failure</title>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <link rel="stylesheet" href="/common.css"> 5 <link rel="stylesheet" href="/common.css">
6 <style> 6 <style>
7 .running { 7 .running {
8 color: #666666; 8 color: #666666;
9 background-color: #fffc6c; 9 background-color: #fffc6c;
10 border-color: #c5c56d; 10 border-color: #c5c56d;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 clRowId = testRowId + "-" + j; 256 clRowId = testRowId + "-" + j;
257 } 257 }
258 i++; 258 i++;
259 testRowId = stepRowId + "-" + i; 259 testRowId = stepRowId + "-" + i;
260 } 260 }
261 } 261 }
262 262
263 function displayTryJobResult() { 263 function displayTryJobResult() {
264 $.getJSON('try-job-result?url=' + findit.buildUrl, function(data) { 264 $.getJSON('try-job-result?url=' + findit.buildUrl, function(data) {
265 if (! jQuery.isEmptyObject(data)) { 265 if (! jQuery.isEmptyObject(data)) {
266 $('#try_job_status').html(data.status); 266 var tableString = '<table><tr><th>Step</th><th>Test</th><th>Try Job< /th><th>Status</th><th>Culprit</th></tr>';
267 if (data.status == 'Error') { 267 $.each(data, function(key, value) {
268 $('#try_job_status').addClass('error'); 268 tableString += '<tr>';
269 } else if(data.status == 'Analyzed') { 269 tableString += '<td>' + value.step + '</td>';
270 $('#try_job_status').addClass('completed'); 270 tableString += '<td>' + value.test + '</td>';
271 } else { 271 if (value.try_job_url) {
272 $('#try_job_status').append(', will refresh in 1 minute...'); 272 tableString += '<td><a href="' + value.try_job_url + '">' + valu e.try_job_build_number + '</a></td>';
273 $('#try_job_status').addClass('running'); 273 } else {
274 } 274 tableString += '<td></td>';
275 if ('try_job_url' in data) { 275 }
276 $('#try_job_url').html(' <a href="' + data.try_job_url + '">try jo b url</a>'); 276 if (value.status == 'Completed') {
277 } 277 status_class = 'completed';
278 278 } else if (value.status == 'Error') {
279 var tryJobStr = ''; 279 status_class = 'error';
280 var repeatStatusList = ["Pending", "Analyzing"] 280 } else {
281 if (repeatStatusList.indexOf(data.status) > -1) { 281 status_class = 'running';
stgao 2016/02/02 22:51:27 nit: Maybe add a comment for the CSS class sharing
chanli 2016/02/02 23:38:08 Done.
282 $('#try_job_result').addClass('not-display'); 282 }
283 setTimeout(displayTryJobResult, 60000); 283 tableString += '<td><span class="' + status_class + '">' + value.s tatus + '</span></td>';
284 } else if (data.status == 'Analyzed' && 'review_url' in data) { 284 if (value.review_url) {
285 tryJobStr += '<br>culprit: <a href="' + data.review_url + '">'; 285 tableString += '<td><a href="' + value.review_url + '">' + value .commit_position || value.revision + '</a></td>';
286 tryJobStr += data.commit_position || data.revision + '</a>'; 286 } else if (value.revision) {
287 $('#try_job_result').html(tryJobStr); 287 tableString += '<td>' + value.revision + '</td>';
288 $('#try_job_result').removeClass('not-display'); 288 } else {
289 } else { 289 tableString += '<td>Not Found</td>';
290 $('#try_job_result').addClass('not-display'); 290 }
291 } 291 tableString += '</tr>';
292 } else { 292 });
293 $('#try_job').addClass('not-display'); 293 tableString += '</table>';
294 $('#try_job_result').html(tableString);
295 $('#try_job').removeClass('not-display');
294 } 296 }
295 }); 297 });
296 } 298 }
297 299
298 $(document).ready(function() { 300 $(document).ready(function() {
299 if (!findit.analysisCompleted) { 301 if (!findit.analysisCompleted) {
300 $('#status_message').text('running, will refresh in 5 seconds...'); 302 $('#status_message').text('running, will refresh in 5 seconds...');
301 $('#status_message').attr('class', 'running'); 303 $('#status_message').attr('class', 'running');
302 setTimeout(function() { 304 setTimeout(function() {
303 {% if show_debug_info %} 305 {% if show_debug_info %}
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 <br> 359 <br>
358 360
359 <b>Build info:</b> 361 <b>Build info:</b>
360 <div> 362 <div>
361 Master: {{master_name}}<br> 363 Master: {{master_name}}<br>
362 Builder: <a href="https://build.chromium.org/p/{{master_name}}/builders/{{bu ilder_name}}">{{builder_name}}</a><br> 364 Builder: <a href="https://build.chromium.org/p/{{master_name}}/builders/{{bu ilder_name}}">{{builder_name}}</a><br>
363 Build Number: <a href="https://build.chromium.org/p/{{master_name}}/builders /{{builder_name}}/builds/{{build_number}}">{{build_number}}</a> 365 Build Number: <a href="https://build.chromium.org/p/{{master_name}}/builders /{{builder_name}}/builds/{{build_number}}">{{build_number}}</a>
364 </div> 366 </div>
365 <br> 367 <br>
366 368
367 <div id='try_job'> 369 <div id='try_job' class='not-display'>
368 <b> Try Job Result:</b> 370 <b> Try Job Result:</b>
369 <br> 371 <div id='try_job_result'></div>
370 status: <span id='try_job_status'></span><span id="try_job_url"></span>
371 <span id='try_job_result'></span>
372 <br> 372 <br>
373 </div> 373 </div>
374 <br> 374 <br>
375 375
376 <b>Analysis info:</b> 376 <b>Analysis info:</b>
377 <div id="analysis_info"> 377 <div id="analysis_info">
378 status: <span id="status_message"></span> 378 status: <span id="status_message"></span>
379 {% if show_debug_info %} 379 {% if show_debug_info %}
380 {% if pipeline_status_path %} 380 {% if pipeline_status_path %}
381 <a href="{{pipeline_status_path}}">pipeline</a> 381 <a href="{{pipeline_status_path}}">pipeline</a>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 appearing in the failure log. (eg: file.h was changed and 468 appearing in the failure log. (eg: file.h was changed and
469 file_unittest.cc or file_impl.cc appeared in the log.)</li> 469 file_unittest.cc or file_impl.cc appeared in the log.)</li>
470 <li>1: The CL rolled a dependency within src/DEPS and a file of that 470 <li>1: The CL rolled a dependency within src/DEPS and a file of that
471 dependency appears in the failure log. (eg: third_party/dep 471 dependency appears in the failure log. (eg: third_party/dep
472 was changed in src/DEPS and third_party/dep/f.cpp appeared 472 was changed in src/DEPS and third_party/dep/f.cpp appeared
473 in the log.)</li> 473 in the log.)</li>
474 </ul> 474 </ul>
475 (More rules will be added when implemented.) 475 (More rules will be added when implemented.)
476 </div> 476 </div>
477 </body> 477 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698