docker-ci/ci/template.html
2022-06-06 00:30:24 +02:00

353 lines
7.5 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CI Results</title>
<meta name="description" content="CI Results">
<meta name="author" content="linuxserver.io">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css?family=Lato:400,700&display=swap" rel="stylesheet">
<script defer src="https://use.fontawesome.com/releases/v5.15.4/js/all.js"
integrity="sha384-rOA1PnstxnOBLzCLMcre8ybwbTmemjzdNlILg8O7z1lUkLXozs4DHonlDtnE7fpc"
crossorigin="anonymous"></script>
<style>
body,
html {
padding: 0;
margin: 0;
}
body {
background: #e8e8e8;
font-family: 'Lato', sans-serif;
color: #738694;
font-weight: 400;
font-size: 16px;
}
body * {
box-sizing: border-box;
}
#logohttpsrawgithubusercontentcomlinuxserverdockertemplatesmasterlinuxserverioimglinuxserver_mediumpng {
display: none;
}
#app {
display: flex;
flex-direction: column;
align-items: center;
padding: 15px;
}
#results {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}
h1 {
font-size: 30px;
letter-spacing: 3px;
text-transform: uppercase;
color: #738694;
margin: 60px 0 45px;
font-weight: 400;
}
h1 span {
color: #9bb0bf;
}
#results h1 {
font-size: 18px;
margin: 0 10px 25px;
word-break: break-all;
}
#results table {
margin: auto;
width: 100%;
}
th {
text-align: left
}
.result-cell {
display: inline-flex;
}
section {
display: flex;
width: 100%;
flex-direction: column;
margin: 10px;
background: #efefef;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
min-width: 320px;
max-width: 600px;
padding: 0 0 30px 0;
flex: 1 1 0;
border-radius: 10px;
}
section>* {
padding: 0 30px;
}
.section-header {
background: #738694;
border-radius: 10px 10px 0 0;
}
.section-header-h2 {
font-size: 17px;
padding: 15px 30px;
margin: 0;
text-align: center;
flex-wrap: wrap;
color: #FFFFFF;
}
em {
color: #32a7c1;
}
/* No image */
section h2+h3 {
border-bottom: 1px solid #dcdcdc;
padding-bottom: 20px;
background: #f5f5f5;
margin: 0;
font-size: 12px;
word-break: break-all;
}
/* Has an image */
section h2+p+h3 {
border-bottom: 1px solid #dcdcdc;
padding: 20px 30px;
background: #f5f5f5;
margin: 0;
font-size: 12px;
word-break: break-all;
}
section h2+p {
margin: 0;
}
section p:empty {
display: none;
}
section h3 {
font-size: 16px;
padding: 0 30px;
}
section img {
width: calc(100% + 60px);
height: auto;
margin-left: -30px;
margin-right: -30px;
padding: 0;
display: block;
}
.debug-section {
max-width: 100%;
}
main {
display: flex;
justify-content: center;
align-items: flex-start;
flex-wrap: wrap;
max-width: 100%;
}
@media only screen and (min-width: 500px) {
h1 {
font-size: 50px;
letter-spacing: 5px;
}
#results h1 {
font-size: 25px;
}
}
.styled-table {
border-collapse: collapse;
margin: 25px 0;
font-size: 0.9em;
font-family: sans-serif;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}
.styled-table thead tr {
background-color: #738694;
color: #ffffff;
text-align: left;
}
.styled-table th,
.styled-table td {
padding: 12px 15px;
}
.styled-table tbody tr {
border-bottom: 1px solid #dddddd;
}
.styled-table tbody tr:nth-of-type(even) {
background-color: #f3f3f3;
}
.styled-table tbody tr:last-of-type {
border-bottom: 2px solid #738694;
}
.styled-table tbody tr.active-row {
font-weight: bold;
color: #738694;
}
.fa-check-circle {
color: rgb(0, 152, 121);
margin-left: 5px;
}
.fa-exclamation-circle {
color: #f44336;
margin-left: 5px;
}
.summary-container {
max-height: 500px;
overflow: auto;
background: #e8e8e8;
}
#debug_logs {
overflow: auto;
}
pre {
padding: 10px;
background: #e8e8e8;
}
.build-version {
border-bottom: 1px solid #dcdcdc;
padding: 20px 30px;
background: #f5f5f5;
margin: 0;
font-size: 12px;
word-break: break-all;
}
.tag-image {
text-align: center;
}
.report-status-pass {
color:rgb(0, 152, 121)
}
.report-status-fail {
color: #f44336;;
}
</style>
</head>
<body>
<div id="app">
<header>
<h1>Linux<span>Server</span>.io</h1>
</header>
<div id="results">
<h1>Test Results <strong>{{ image }}:{{ meta_tag }}</strong></h1>
<h2>Cumulative: <span class="report-status-{{ report_status.lower() }}">{{ report_status }}</span></h2>
<main>
{% for container in report_containers %}
<section>
<div class="section-header">
<h2 class="section-header-h2"> {{ image }}:{{ container["tag"] }} </h2>
</div>
{% if screenshot == 'true' %}
<a href="{{ container['tag'] }}.png">
<img src="{{ container['tag'] }}.png" alt="{{ container['tag'] }}" width="600" height="auto">
</a>
{% else %}
<div class="tag-image">
<span>No Image</span><i class="fas fa-file-image"></i>
</div>
{% endif %}
<h3 class="build-version">Build Version: {{ container["build_version"] }}</h3>
<h3>Logs</h3>
<details>
<summary>Expand</summary>
<div class="summary-container"><pre><code>{{ container["logs"] }}</code>
</pre></div>
</details>
<h3>Package info</h3>
<details>
<summary>Expand</summary>
<div class="summary-container"><pre><code>{{ container["sysinfo"] }}</code>
</pre></div>
</details>
<br>
<div class="table-container">
<table class="styled-table">
<thead>
<tr class="active-row">
<th>Test</th>
<th>Result</th>
</tr>
</thead>
<tbody>
{% for test in container["tag_tests"] %}
<tr>
<td>{{ test[0] }}</td>
{% if test[1] == 'PASS' %}
<td class="result-cell">{{ test[1] }} <i class="fas fa-check-circle"></i></td>
{% else %}
<td class="result-cell">{{ test[1] }} <i class="fas fa-exclamation-circle"></i></td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
{% endfor %}
</main>
</div>
<section class="debug-section">
<h3>Debug logs</h3>
<details>
<summary>Expand</summary>
<pre id="debug_logs"></pre>
</details>
</section>
</div>
<script type="text/javascript" charset="utf-8">
fetch("debug.log")
.then(response => response.text())
.then(logs => {
document.getElementById("debug_logs").innerText = logs
})
</script>
</body>
</html>