Improve ops status diagnostics
All checks were successful
Build & Push Docker Image to Gitea Registry / build-and-push (push) Successful in 11s
All checks were successful
Build & Push Docker Image to Gitea Registry / build-and-push (push) Successful in 11s
This commit is contained in:
10
admin.js
10
admin.js
@@ -290,7 +290,10 @@ function formatBytes(bytes) {
|
||||
function renderDisks(disks = []) {
|
||||
diskStatus.innerHTML = disks.map((disk) => {
|
||||
if (disk.error) {
|
||||
return `<div class="ops-line"><strong>${disk.label}</strong><span>${disk.error}</span></div>`;
|
||||
const hint = disk.mount
|
||||
? `Mount fehlt: ${disk.mount}`
|
||||
: disk.error;
|
||||
return `<div class="ops-line is-warning"><strong>${disk.label}</strong><span>${hint}</span></div>`;
|
||||
}
|
||||
|
||||
const level = disk.usedPercent >= 90 ? 'danger' : disk.usedPercent >= 80 ? 'warn' : 'ok';
|
||||
@@ -309,7 +312,10 @@ function renderDisks(disks = []) {
|
||||
function renderWatchtower(watchtower) {
|
||||
const session = watchtower?.lastSession;
|
||||
if (!session) {
|
||||
watchtowerStatus.textContent = 'Kein Watchtower-Lauf gefunden.';
|
||||
const tail = watchtower?.tail?.slice(-4)?.join(' | ');
|
||||
watchtowerStatus.textContent = tail
|
||||
? `Kein Lauf geparst. Letzte Logs: ${tail}`
|
||||
: 'Kein Watchtower-Lauf gefunden.';
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user