Show snapshot path counts

This commit is contained in:
Mikei386
2026-06-21 14:36:14 +02:00
parent 8c8771f82e
commit 0b991576ad
8 changed files with 20 additions and 19 deletions
-1
View File
@@ -1 +0,0 @@
be03acb4a5ea3055e04aeeffc65f231fd3c1b1d4f3595bd53a791e2d0b4880e9 urbm-2026.06.21.r003-x86_64-1.txz
+1
View File
@@ -0,0 +1 @@
de97522e160f960e3842aaf47bf16bdabfc737c20682176e302c6a840a02588c urbm-2026.06.21.r004-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.r003">
<!ENTITY version "2026.06.21.r004">
<!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 "be03acb4a5ea3055e04aeeffc65f231fd3c1b1d4f3595bd53a791e2d0b4880e9">
<!ENTITY packageSHA256 "de97522e160f960e3842aaf47bf16bdabfc737c20682176e302c6a840a02588c">
]>
<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.r004
- Show only the number of source paths in the snapshot list to avoid horizontal overflow.
- Keep the full path list available as a tooltip and show actual contents in the snapshot browser.
### 2026.06.21.r003
- Compact long snapshot path lists into wrapped path chips with a remaining-count indicator.
- Prevent snapshot tables from forcing a horizontal page overflow when many source paths exist.
+5 -1
View File
@@ -2,13 +2,17 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "urbm">
<!ENTITY author "Michael Roll">
<!ENTITY version "2026.06.21.r003">
<!ENTITY version "2026.06.21.r004">
<!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.r004
- Show only the number of source paths in the snapshot list to avoid horizontal overflow.
- Keep the full path list available as a tooltip and show actual contents in the snapshot browser.
### 2026.06.21.r003
- Compact long snapshot path lists into wrapped path chips with a remaining-count indicator.
- Prevent snapshot tables from forcing a horizontal page overflow when many source paths exist.
+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=20260621r003">
<link rel="stylesheet" href="<?= $pluginRoot ?>/assets/urbm.css?v=20260621r004">
<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=20260621r003" alt="URBM-Logo">
<div><h1>URBM <span class="bu-version">2026.06.21.r003</span></h1><p>Restic Backup Manager für Unraid</p></div>
<img class="bu-logo" src="<?= $pluginRoot ?>/images/urbm.png?v=20260621r004" alt="URBM-Logo">
<div><h1>URBM <span class="bu-version">2026.06.21.r004</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.r003.js"></script>
<script src="<?= $pluginRoot ?>/assets/urbm-2026.06.21.r004.js"></script>
+2 -4
View File
@@ -171,10 +171,8 @@
.bu-snapshot-id { width: 90px; }
.bu-snapshot-time { width: 175px; }
.bu-snapshot-host { width: 130px; }
.bu-snapshot-actions { width: 145px; }
.bu-path-list { display: flex; flex-wrap: wrap; gap: 5px; max-width: 100%; min-width: 0; }
.bu-path-chip, .bu-path-more { background: var(--bu-panel-alt); border: 1px solid var(--bu-border); border-radius: 999px; color: var(--bu-text); display: inline-block; font-size: 12px; line-height: 1.25; max-width: 260px; overflow: hidden; padding: 4px 8px; text-overflow: ellipsis; white-space: nowrap; }
.bu-path-more { color: var(--bu-muted); font-weight: 700; }
.bu-snapshot-actions { width: 130px; }
.bu-path-count { background: var(--bu-panel-alt); border: 1px solid var(--bu-border); border-radius: 999px; color: var(--bu-text); display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 8px; white-space: nowrap; }
.bu-runs-table { table-layout: fixed; }
.bu-runs-table .bu-run-task { width: 18%; }
.bu-runs-table .bu-run-status { width: 9%; }
+2 -7
View File
@@ -628,13 +628,8 @@
function renderSnapshots() {
const options = state.config.repositories.map(r=>`<option value="${esc(r.id)}">${esc(r.name)}</option>`).join('');
const pathList = paths => {
paths = paths || [];
const visible = paths.slice(0, 4).map(path=>`<span class="bu-path-chip" title="${esc(path)}">${esc(path)}</span>`).join('');
const more = paths.length > 4 ? `<span class="bu-path-more" title="${esc(paths.slice(4).join('\n'))}">+${paths.length-4} weitere</span>` : '';
return `<div class="bu-path-list" title="${esc(paths.join('\n'))}">${visible}${more || (!paths.length ? '<span class="bu-muted">Keine Pfade</span>' : '')}</div>`;
};
const rows = state.snapshots.map(s=>`<tr><td>${esc(s.short_id||s.id)}</td><td>${esc(new Date(s.time).toLocaleString())}</td><td>${esc(s.hostname)}</td><td>${pathList(s.paths)}</td><td>${button('Durchsuchen',`browse:${s.id}`)}</td></tr>`).join('');
const pathCount = paths => `<span class="bu-path-count" title="${esc((paths||[]).join('\n'))}">${Number((paths||[]).length).toLocaleString()} Pfad${(paths||[]).length===1?'':'e'}</span>`;
const rows = state.snapshots.map(s=>`<tr><td>${esc(s.short_id||s.id)}</td><td>${esc(new Date(s.time).toLocaleString())}</td><td>${esc(s.hostname)}</td><td>${pathCount(s.paths)}</td><td>${button('Durchsuchen',`browse:${s.id}`)}</td></tr>`).join('');
return `<div class="bu-toolbar"><h2>Snapshots</h2><div class="bu-actions"><select id="bu-snapshot-repo">${options}</select>${button('Laden','load-snapshots','primary')}</div></div><section class="bu-card">${rows?`<div class="bu-table-scroll"><table class="bu-table bu-snapshot-table"><colgroup><col class="bu-snapshot-id"><col class="bu-snapshot-time"><col class="bu-snapshot-host"><col class="bu-snapshot-paths"><col class="bu-snapshot-actions"></colgroup><thead><tr><th>Snapshot</th><th>Zeitpunkt</th><th>Host</th><th>Pfade</th><th></th></tr></thead><tbody>${rows}</tbody></table></div>`:'<div class="bu-empty">Repository auswählen und Snapshots laden.</div>'}</section>${state.selectedSnapshot ? renderFileBrowser() : ''}`;
}