Show snapshot loading progress bar

This commit is contained in:
Mikei386
2026-06-21 16:17:02 +02:00
parent 8378b06d2f
commit 2b6b629db9
8 changed files with 19 additions and 9 deletions
-1
View File
@@ -1 +0,0 @@
03a78ede9f43f0848f0ac688f436a51f5fcd01dbf5638298c6ece7e8b18a742a urbm-2026.06.21.r006-x86_64-1.txz
+1
View File
@@ -0,0 +1 @@
7b3b3c9fd00ce2aae592ea4ec84d2875afce72ca2cad2f24a7e075312a6c528f urbm-2026.06.21.r007-x86_64-1.txz
+6 -2
View File
@@ -2,13 +2,17 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "urbm">
<!ENTITY author "Michael Roll">
<!ENTITY version "2026.06.21.r006">
<!ENTITY version "2026.06.21.r007">
<!ENTITY pluginURL "https://git.casaderoll.de/michael/URBM/raw/branch/main/dist/urbm.plg">
<!ENTITY packageURL "https://git.casaderoll.de/michael/URBM/raw/branch/main/dist/urbm-&version;-x86_64-1.txz">
<!ENTITY packageSHA256 "03a78ede9f43f0848f0ac688f436a51f5fcd01dbf5638298c6ece7e8b18a742a">
<!ENTITY packageSHA256 "7b3b3c9fd00ce2aae592ea4ec84d2875afce72ca2cad2f24a7e075312a6c528f">
]>
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" min="7.0.0" support="https://git.casaderoll.de/michael/URBM/issues" icon="urbm.png">
<CHANGES>
### 2026.06.21.r007
- Show an indeterminate progress bar while a complete snapshot file tree is loading.
- Explain that no real percentage is available because Restic returns the full file listing only after completion.
### 2026.06.21.r006
- Sort runs and snapshots newest-first so lists get older from top to bottom.
- Apply newest-first ordering consistently to dashboard activity, activity history, failed runs, and snapshot tables.
+5 -1
View File
@@ -2,13 +2,17 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "urbm">
<!ENTITY author "Michael Roll">
<!ENTITY version "2026.06.21.r006">
<!ENTITY version "2026.06.21.r007">
<!ENTITY pluginURL "https://git.casaderoll.de/michael/URBM/raw/branch/main/dist/urbm.plg">
<!ENTITY packageURL "https://git.casaderoll.de/michael/URBM/raw/branch/main/dist/urbm-&version;-x86_64-1.txz">
<!ENTITY packageSHA256 "REPLACE_DURING_RELEASE">
]>
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" min="7.0.0" support="https://git.casaderoll.de/michael/URBM/issues" icon="urbm.png">
<CHANGES>
### 2026.06.21.r007
- Show an indeterminate progress bar while a complete snapshot file tree is loading.
- Explain that no real percentage is available because Restic returns the full file listing only after completion.
### 2026.06.21.r006
- Sort runs and snapshots newest-first so lists get older from top to bottom.
- Apply newest-first ordering consistently to dashboard activity, activity history, failed runs, and snapshot tables.
+4 -4
View File
@@ -9,12 +9,12 @@ Tag="URBM Unraid Restic Backup Manager backup snapshots restore"
<?php
$pluginRoot = '/plugins/urbm';
?>
<link rel="stylesheet" href="<?= $pluginRoot ?>/assets/urbm.css?v=20260621r006">
<link rel="stylesheet" href="<?= $pluginRoot ?>/assets/urbm.css?v=20260621r007">
<div id="urbm-app" data-api="<?= $pluginRoot ?>/api.php">
<header class="bu-header">
<div class="bu-brand">
<img class="bu-logo" src="<?= $pluginRoot ?>/images/urbm.png?v=20260621r006" alt="URBM-Logo">
<div><h1>URBM <span class="bu-version">2026.06.21.r006</span></h1><p>Restic Backup Manager für Unraid</p></div>
<img class="bu-logo" src="<?= $pluginRoot ?>/images/urbm.png?v=20260621r007" alt="URBM-Logo">
<div><h1>URBM <span class="bu-version">2026.06.21.r007</span></h1><p>Restic Backup Manager für Unraid</p></div>
</div>
<div id="bu-health" class="bu-health" tabindex="0" data-tooltip="Zeigt, ob die URBM-Hintergrundkomponente erreichbar ist. Beispiel: 'Daemon online' bedeutet, dass Jobs gestartet werden können.">Verbindung wird hergestellt...</div>
</header>
@@ -32,4 +32,4 @@ $pluginRoot = '/plugins/urbm';
<div id="bu-tooltip" role="tooltip" aria-hidden="true"></div>
</div>
<script>window.URBM_CSRF = <?= json_encode($var['csrf_token'] ?? '') ?>;</script>
<script src="<?= $pluginRoot ?>/assets/urbm-2026.06.21.r006.js"></script>
<script src="<?= $pluginRoot ?>/assets/urbm-2026.06.21.r007.js"></script>
+1
View File
@@ -101,6 +101,7 @@
.bu-tree-children::before { background: var(--bu-border); bottom: 3px; content: ''; left: calc((var(--bu-tree-depth, 0) + 1) * 22px + 18px); opacity: .45; position: absolute; top: 0; width: 1px; }
.bu-tree-state { color: var(--bu-muted); margin-left: 66px; padding: 8px 12px; }
.bu-tree-state.error { color: var(--bu-bad); }
.bu-snapshot-loading { background: var(--bu-panel-alt); border: 1px solid var(--bu-border); border-radius: 6px; margin: 8px; padding: 14px; }
.bu-count { align-items: center; border: 1px solid var(--bu-border); border-radius: 999px; display: inline-flex; font-size: 13px; font-weight: 700; padding: 7px 11px; }
.bu-inline-error { background: rgba(180,35,47,.08); border: 1px solid var(--bu-bad); border-radius: 5px; color: var(--bu-bad); font-weight: 600; margin: 10px 0; padding: 10px 12px; }
.bu-inline-info { background: rgba(19,138,98,.08); border: 1px solid var(--bu-good); border-radius: 5px; color: var(--bu-text); font-weight: 600; margin: 10px 0; padding: 10px 12px; }
+2 -1
View File
@@ -682,7 +682,8 @@
function renderFileBrowser() {
const chosen = state.restoreIncludes.length ? state.restoreIncludes.map(path=>`<span class="bu-selection">${esc(path)}</span>`).join('') : '<span class="bu-muted">Nichts ausgewählt.</span>';
const body=state.snapshotTreeLoading?'<div class="bu-tree-state">Snapshot-Struktur wird vollständig eingelesen…</div>':state.snapshotTreeError?`<div class="bu-inline-error">${esc(state.snapshotTreeError)}</div>`:state.snapshotTree?snapshotTreeNode(state.snapshotTree,0):'<div class="bu-empty">Keine Dateien im Snapshot gefunden.</div>';
const loading='<div class="bu-snapshot-loading"><div class="bu-progress-wrap"><div class="bu-progress-label"><strong>Snapshot-Struktur wird vollständig eingelesen…</strong><span>Kein Prozentwert verfügbar, Restic liefert die Dateiliste erst am Ende zurück.</span></div><div class="bu-progress indeterminate"><span style="width:30%"></span></div></div></div>';
const body=state.snapshotTreeLoading?loading:state.snapshotTreeError?`<div class="bu-inline-error">${esc(state.snapshotTreeError)}</div>`:state.snapshotTree?snapshotTreeNode(state.snapshotTree,0):'<div class="bu-empty">Keine Dateien im Snapshot gefunden.</div>';
return `<section class="bu-card" style="margin-top:16px"><div class="bu-toolbar"><div><h3>Snapshot ${esc(state.selectedSnapshot.slice(0,12))}</h3><span class="bu-muted">${state.files.length?`${state.files.length.toLocaleString()} Einträge vorgeladen`:'Struktur noch nicht geladen'}</span></div><div class="bu-actions">${button(`Auswahl wiederherstellen (${state.restoreIncludes.length})`,'restore-selected','primary')}</div></div><div class="bu-selection-list">${chosen}</div><div class="bu-tree" role="tree">${body}</div></section>`;
}