mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 07:17:17 +00:00
pretty status html
This commit is contained in:
parent
4445c8c871
commit
3405105dce
@ -26,12 +26,36 @@
|
|||||||
100% { background-color: rgba(var(--color-building), 0.0); }
|
100% { background-color: rgba(var(--color-building), 0.0); }
|
||||||
}
|
}
|
||||||
|
|
||||||
table, th, td {
|
div.root {
|
||||||
|
width: 70%;
|
||||||
|
padding: 15px 15% 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.element {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
input, table {
|
||||||
|
width: inherit;
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
td.package {
|
|
||||||
font-weight: bolder;
|
tr.package:nth-child(odd) {
|
||||||
|
background-color: rgba(255, 255, 255, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tr.package:nth-child(even) {
|
||||||
|
background-color: rgba(235, 235, 255, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.header, tr.package:hover {
|
||||||
|
background-color: rgba(200, 200, 255, 1);
|
||||||
|
}
|
||||||
|
|
||||||
td.package-unknown {
|
td.package-unknown {
|
||||||
background-color: rgba(var(--color-unknown), 1.0);
|
background-color: rgba(var(--color-unknown), 1.0);
|
||||||
}
|
}
|
||||||
@ -55,32 +79,64 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script src="https://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script>
|
<script src="https://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function searchInTable() {
|
||||||
|
const input = document.getElementById("search");
|
||||||
|
const filter = input.value.toLowerCase();
|
||||||
|
const table = document.getElementById("builds");
|
||||||
|
const tr = table.getElementsByTagName("tr");
|
||||||
|
|
||||||
|
// from 1 coz of header
|
||||||
|
for (var i = 1; i < tr.length; i++) {
|
||||||
|
let td = tr[i].getElementsByClassName("include-search");
|
||||||
|
let display = "none";
|
||||||
|
for (var j = 0; j < td.length; j++) {
|
||||||
|
if (td[j].tagName.toLowerCase() === "td") {
|
||||||
|
if (td[j].innerHTML.toLowerCase().indexOf(filter) > -1) {
|
||||||
|
display = "";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tr[i].style.display = display;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>ahriman {{ version|e }}</h1>
|
<div class="root">
|
||||||
|
<h1>ahriman {{ version|e }}</h1>
|
||||||
|
|
||||||
<table class="sortable" id="builds">
|
<section class="element">
|
||||||
<tr>
|
<input type="search" id="search" onkeyup="searchInTable()" placeholder="search for package" title="search for package"/>
|
||||||
<th>package base</th>
|
</section>
|
||||||
<th>packages</th>
|
|
||||||
<th>version</th>
|
|
||||||
<th>architecture</th>
|
|
||||||
<th>timestamp</th>
|
|
||||||
<th>status</th>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
{% for package in packages %}
|
<section class="element">
|
||||||
<tr>
|
<table class="sortable" id="builds">
|
||||||
<td class="package"><a href="{{ package.web_url|e }}" title="{{ package.base|e }}">{{ package.base|e }}</a></td>
|
<tr class="header">
|
||||||
<td>{{ package.packages|join("<br>"|safe) }}</td>
|
<th>package base</th>
|
||||||
<td>{{ package.version|e }}</td>
|
<th>packages</th>
|
||||||
<td>{{ architecture|e }}</td>
|
<th>version</th>
|
||||||
<td>{{ package.timestamp|e }}</td>
|
<th>architecture</th>
|
||||||
<td class="package-{{ package.status|e }}">{{ package.status|e }}</td>
|
<th>last update</th>
|
||||||
</tr>
|
<th>status</th>
|
||||||
{% endfor %}
|
</tr>
|
||||||
</table>
|
|
||||||
|
{% for package in packages %}
|
||||||
|
<tr class="package">
|
||||||
|
<td class="package include-search"><a href="{{ package.web_url|e }}" title="{{ package.base|e }}">{{ package.base|e }}</a></td>
|
||||||
|
<td class="include-search">{{ package.packages|join("<br>"|safe) }}</td>
|
||||||
|
<td>{{ package.version|e }}</td>
|
||||||
|
<td>{{ architecture|e }}</td>
|
||||||
|
<td>{{ package.timestamp|e }}</td>
|
||||||
|
<td class="package-{{ package.status|e }}">{{ package.status|e }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user