Files
esp-idf/tools/ci/dynamic_pipelines/templates/report.template.html
T
Aleksei Apaseev cd59d96ff4 ci: add dut_log_url column to failed testcases report
Introduced changes:
- add xml attribute "dut_log_url" to pytest report
- add column "dut_log_url" to failed testcases table of dynamic pipeline report
- make the table header sticky
- add permalinks to the Table Titles
- split target test report by testcase type for better clarity
- fix the logic of finding the testcases failed on cur branch / other branches
2024-07-17 17:52:11 +08:00

89 lines
3.5 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>{{title}}</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://unpkg.com/bootstrap-table@1.22.1/dist/bootstrap-table.min.css" rel="stylesheet" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-table@1.23.0/dist/extensions/sticky-header/bootstrap-table-sticky-header.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
<style>
.text-toggle, .full-text { cursor: pointer; }
th:nth-child(1), td:nth-child(1) { width: 5%; }
th:nth-child(2), td:nth-child(2),
th:nth-child(3), td:nth-child(3) { width: 30%; }
th, td {
overflow: hidden;
text-overflow: ellipsis;
}
h2 {
margin-top: 10px;
}
.copy-link-icon {
font-size: 20px;
margin-left: 10px;
color: #8f8f97;
cursor: pointer;
}
.copy-link-icon:hover {
color: #282b2c;
}
</style>
</head>
<body>
<div class="container-fluid">{{table}}</div>
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://unpkg.com/bootstrap-table@1.22.1/dist/bootstrap-table.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap-table@1.23.0/dist/extensions/sticky-header/bootstrap-table-sticky-header.min.js"></script>
<script>
$(window).on('load', function() {
var hash = window.location.hash;
if (hash) {
setTimeout(function() {
$('html, body').animate({ scrollTop: $(hash).offset().top }, 100);
}, 100);
}
});
</script>
<script>
function copyPermalink(anchorId) {
const fullUrl = window.location.origin + window.location.pathname + anchorId;
history.pushState(null, null, anchorId);
navigator.clipboard.writeText(fullUrl)
setTimeout(function() {
$('html, body').animate({ scrollTop: $(anchorId).offset().top }, 100);
}, 100);
}
</script>
<script>
$(document).ready(function() {
$('table.table td').each(function() {
var cell = $(this);
if (cell.text().length > 100) {
var originalText = cell.text();
var displayText = originalText.substring(0, 100) + '...';
cell.html('<span class="text-toggle">' + displayText + '</span><span class="full-text" style="display: none;">' + originalText + '</span>');
cell.append('<a href="#" class="toggle-link">Show More</a>');
}
});
$('body').on('click', '.toggle-link', function(e) {
e.preventDefault();
var link = $(this);
var textSpan = link.siblings('.full-text');
var toggleSpan = link.siblings('.text-toggle');
if (textSpan.is(':visible')) {
link.text('Show More');
textSpan.hide();
toggleSpan.show();
} else {
link.text('Show Less');
textSpan.show();
toggleSpan.hide();
}
});
});
</script>
</body>
</html>