wip status page

This commit is contained in:
2023-12-14 16:48:04 +01:00
parent b897198b85
commit 64bef9e27a

View File

@@ -4,7 +4,8 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1" name="viewport"> <meta content="width=device-width, initial-scale=1" name="viewport">
<title>ALHP Status</title> <title>ALHP Status</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css" <link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css"
integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" rel="stylesheet"> integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" rel="stylesheet">
</head> </head>
@@ -35,88 +36,67 @@
</div> </div>
<h3 class="mt-5">Packages</h3> <h3 class="mt-5">Packages</h3>
<div class="accordion" id="accordion-{{$march.Name}}"> <table class="table table-sorted">
{{range $repo := $march.Repos}} <thead>
<div class="accordion-item bg-opacity-25"> <tr>
<h2 class="accordion-header" id="heading-{{$march.Name}}-{{$repo.Name}}"> <th scope="col">Pkgbase</th>
<button aria-controls="collapse-{{$march.Name}}-{{$repo.Name}}" aria-expanded="false" <th scope="col">Status</th>
class="accordion-button" <th scope="col">Reason</th>
data-bs-target="#collapse-{{$march.Name}}-{{$repo.Name}}" <th class="text-center" scope="col"
data-bs-toggle="collapse" title="link time optimization&#10;does not guarantee that package is actually build with LTO">
type="button">{{$repo.Name}}-{{$march.Name}} LTO
</button> </th>
</h2> <th class="text-center" scope="col" title="Debug-symbols available via debuginfod">DS
<div aria-labelledby="heading-{{$march.Name}}-{{$repo.Name}}" </th>
class="accordion-collapse collapse show" <th scope="col">Archlinux Version</th>
data-bs-parent="#accordion-{{$march.Name}}" id="collapse-{{$march.Name}}-{{$repo.Name}}"> <th scope="col">ALHP Version</th>
<div class="accordion-body overflow-auto"> <th class="text-end" scope="col">Info</th>
<table class="table table-sorted"> </tr>
<thead> </thead>
<tr> <tbody id="main-tbody">
<th scope="col">Pkgbase</th> {{range $pkg := $repo.Packages}}
<th scope="col">Status</th> <tr class="table-{{$pkg.Class}}"
<th scope="col">Reason</th> id="{{$repo.Name}}-{{$march.Name}}-{{$pkg.Pkgbase}}">
<th class="text-center" scope="col" <td>{{$pkg.Pkgbase}}</td>
title="link time optimization&#10;does not guarantee that package is actually build with LTO"> <td>{{$pkg.Status}}</td>
LTO <td>{{$pkg.Skip}}</td>
</th> <td class="text-center fs-6">
<th class="text-center" scope="col" title="Debug-symbols available via debuginfod">DS {{if $pkg.LTO}}<i class="fa fa-check fa-lg" style="color: var(--bs-success)"
</th> title="build with LTO"></i>{{end}}
<th scope="col">Archlinux Version</th> {{if $pkg.LTODisabled}}<i class="fa fa-times fa-lg" style="color: var(--bs-danger)"
<th scope="col">{{$repo.Name}}-{{$march.Name}} Version</th> title="LTO explicitly disabled"></i>{{end}}
<th class="text-end" scope="col">Info</th> {{if $pkg.LTOAutoDisabled}}<i class="fa fa-times-circle-o fa-lg"
</tr> style="color: var(--bs-danger)"
</thead> title="LTO automatically disabled"></i>{{end}}
<tbody> {{if $pkg.LTOUnknown}}<i class="fa fa-hourglass-o fa-lg"
{{range $pkg := $repo.Packages}} title="not build with LTO yet"></i>{{end}}
<tr class="table-{{$pkg.Class}}" </td>
id="{{$repo.Name}}-{{$march.Name}}-{{$pkg.Pkgbase}}"> <td class="text-center fs-6">
<td>{{$pkg.Pkgbase}}</td> {{if $pkg.DebugSym}}<i class="fa fa-check fa-lg" style="color: var(--bs-success)"
<td>{{$pkg.Status}}</td> title="Debug symbols available"></i>{{end}}
<td>{{$pkg.Skip}}</td> {{if $pkg.DebugSymNotAvailable}}<i class="fa fa-times fa-lg"
<td class="text-center fs-6"> style="color: var(--bs-danger)"
{{if $pkg.LTO}}<i class="fa fa-check fa-lg" style="color: var(--bs-success)" title="Not build with debug symbols"></i>{{end}}
title="build with LTO"></i>{{end}} {{if $pkg.DebugSymUnknown}}<i class="fa fa-hourglass-o fa-lg"
{{if $pkg.LTODisabled}}<i class="fa fa-times fa-lg" style="color: var(--bs-danger)" title="Not build yet"></i>{{end}}
title="LTO explicitly disabled"></i>{{end}} </td>
{{if $pkg.LTOAutoDisabled}}<i class="fa fa-times-circle-o fa-lg" <td>{{$pkg.Svn2GitVersion}}</td>
style="color: var(--bs-danger)" <td>{{$pkg.Version}}</td>
title="LTO automatically disabled"></i>{{end}} <td class="text-end info-box">
{{if $pkg.LTOUnknown}}<i class="fa fa-hourglass-o fa-lg" {{with $pkg.Log}}<a href="{{.}}" title="build log"
title="not build with LTO yet"></i>{{end}} ><i class="fa fa-file-text fa-lg"></i></a
</td> >{{end}}
<td class="text-center fs-6"> <a class="text-decoration-none fw-bold"
{{if $pkg.DebugSym}}<i class="fa fa-check fa-lg" style="color: var(--bs-success)" href="https://archlinux.org/packages/?q={{$pkg.Pkgbase}}" title="ArchWeb">AW</a>
title="Debug symbols available"></i>{{end}} <a data-bs-html="true" data-bs-placement="bottom" data-bs-toggle="tooltip"
{{if $pkg.DebugSymNotAvailable}}<i class="fa fa-times fa-lg" href="#{{$repo.Name}}-{{$march.Name}}-{{$pkg.Pkgbase}}"
style="color: var(--bs-danger)" title="{{if $pkg.BuildDate}}Build on {{$pkg.BuildDate}}&#10;{{end}}{{if $pkg.BuildDuration}}CPU-Time: {{$pkg.BuildDuration}}&#10;{{end}}{{if $pkg.BuildMemory}}Peak-Memory: {{$pkg.BuildMemory}}&#10;{{end}}Last checked on {{$pkg.Checked}}">
title="Not build with debug symbols"></i>{{end}} <i class="fa fa-info-circle fa-lg"></i></a>
{{if $pkg.DebugSymUnknown}}<i class="fa fa-hourglass-o fa-lg" </td>
title="Not build yet"></i>{{end}} </tr>
</td>
<td>{{$pkg.Svn2GitVersion}}</td>
<td>{{$pkg.Version}}</td>
<td class="text-end info-box">
{{with $pkg.Log}}<a href="{{.}}" title="build log"
><i class="fa fa-file-text fa-lg"></i></a
>{{end}}
<a class="text-decoration-none fw-bold"
href="https://archlinux.org/packages/?q={{$pkg.Pkgbase}}" title="ArchWeb">AW</a>
<a data-bs-html="true" data-bs-placement="bottom" data-bs-toggle="tooltip"
href="#{{$repo.Name}}-{{$march.Name}}-{{$pkg.Pkgbase}}"
title="{{if $pkg.BuildDate}}Build on {{$pkg.BuildDate}}&#10;{{end}}{{if $pkg.BuildDuration}}CPU-Time: {{$pkg.BuildDuration}}&#10;{{end}}{{if $pkg.BuildMemory}}Peak-Memory: {{$pkg.BuildMemory}}&#10;{{end}}Last checked on {{$pkg.Checked}}">
<i class="fa fa-info-circle fa-lg"></i></a>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
</div>
{{end}} {{end}}
</div> </tbody>
{{end}} </table>
</div> </div>
<footer class="text-center text-lg-start bg-dark mt-3 fixed-bottom"> <footer class="text-center text-lg-start bg-dark mt-3 fixed-bottom">
@@ -134,21 +114,43 @@
</div> </div>
</footer> </footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script> <script>
let input = document.getElementById('table-sort-input'); let input = document.getElementById('table-sort-input');
let timeout = null; let timeout = null;
input.addEventListener('input', function (e) { function searchPackages() {
clearTimeout(timeout); let new_tbody = document.createElement('tbody');
axios.get('https://api.alhp.dev/packages', {
params: {
pkgbase: (input.value.toLowerCase() ? input.value.toLowerCase() : undefined),
page: 1,
limit: 50,
}
})
.then(function (response) {
console.log(response)
let jResp = JSON.parse(response)
for (const pkg of jResp.packages) {
let ntr = document.createElement('tr')
ntr.classList.add("")
}
})
.catch(function (error) {
console.log(error);
})
.finally(function () {
// always executed
});
timeout = setTimeout(searchFilter, 200);
});
function searchFilter() {
let input, filter, tr, td, i, txtValue; let input, filter, tr, td, i, txtValue;
input = document.getElementById('table-sort-input') input = document.getElementById('table-sort-input')
filter = input.value.toUpperCase() filter = input.value.toLowerCase()
const tables = document.getElementsByClassName('table-sorted'); const tables = document.getElementsByClassName('table-sorted');
for (let j = 0; j < tables.length; j++) { for (let j = 0; j < tables.length; j++) {
tr = tables[j].getElementsByTagName('tr') tr = tables[j].getElementsByTagName('tr')
@@ -165,6 +167,12 @@
} }
} }
} }
input.addEventListener('input', function (e) {
clearTimeout(timeout);
timeout = setTimeout(searchPackages, 200);
});
</script> </script>
</body> </body>
</html> </html>