Rework Dashboard, add toasts, container folders/icons/WebUI links, detail tabs
Lint / ShellCheck (push) Successful in 11s
Lint / Validate .plg XML (push) Successful in 10s
Lint / EditorConfig (push) Successful in 6s

Dashboard:
- Plain-count stat tiles (Running/Stopped/Pods/Images/Volumes/Networks)
  separated from a single "Resource Usage" card (CPU/Memory/Swap/Storage
  meter rows) instead of forcing both into one tile grid, which produced
  awkward spanning-tile/dead-cell layouts.
- Fixed CPU usage never changing (libpod's own cpuUtilization is computed
  once and never resampled) by computing it from /proc/stat deltas instead.
- Fixed memory usage reading far too high by using /proc/meminfo's
  MemAvailable instead of libpod's raw (non-reclaimable-aware) memFree.
- Added an Autostart Queue table reusing podman-autostart.sh's own
  failure-counter files.
- Dashboard and Containers now auto-refresh every ~2s (paused when the
  tab is hidden or a modal is open).

Toasts:
- Real success/warn/error/info toast notifications replacing every
  alert() used for one-way feedback, across every panel.

Container detail modal:
- 5 new tabs: Resources, Logs, Console, Events, Healthcheck.

Containers panel:
- Folders to group containers (name + icon), stored in the plugin's own
  folders.json — a folder's header always shows an icon+name+status chip
  per member, matching Unraid's own Docker page folders. "Move to
  Folder" becomes "Remove from Folder" once a container is already
  grouped.
- Containers can carry an icon URL and a WebUI URL (small button next to
  the name), both stored as container labels and auto-filled from
  templates where applicable.
- Settings: an "Add container" control for the Autostart order table.

Fixes:
- Context menus now measure their own rendered size and flip above the
  anchor when there isn't room below, instead of running off-screen.
- Containers table now uses table-layout:fixed with explicit column
  widths — auto layout was shifting every column (and the header) on
  every folder expand/collapse, and briefly again when a flex wrapper
  was mistakenly placed directly on a <td>.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-13 21:32:34 +00:00
co-authored by Claude Sonnet 5
parent 1ca78e7115
commit 23898ff62e
20 changed files with 1416 additions and 100 deletions
+13 -4
View File
@@ -85,11 +85,17 @@
if (!selected) return;
const btn = P.el('compose-action-' + action);
btn.disabled = true;
// `podman compose` output can run to many lines — a log modal (same
// pattern as Settings' service Start/Stop/Restart) fits that; a toast
// has to stay short and auto-dismiss.
const modal = P.openLogModal('podman compose ' + action + ' — ' + selected);
P.post('compose', action, { project: selected }).then(function (data) {
alert((data.output || 'Done.').slice(0, 2000));
(data.output || 'Done.').split('\n').forEach(function (line) { modal.log(line); });
modal.done();
return loadProjects();
}).catch(function (err) {
alert('podman compose ' + action + ' failed: ' + err.message);
modal.log('Failed: ' + err.message);
modal.done('Close');
}).finally(function () {
btn.disabled = false;
});
@@ -100,9 +106,10 @@
const btn = P.el('compose-action-save');
btn.disabled = true;
P.post('compose', 'save', { project: selected, yaml: P.el('compose-yaml').value }).then(function () {
P.toast('Saved ' + selected + '.', 'success');
return loadProjects();
}).catch(function (err) {
alert('Save failed: ' + err.message);
P.toast('Save failed: ' + err.message, 'error');
}).finally(function () {
btn.disabled = false;
});
@@ -113,11 +120,13 @@
if (!confirm('Delete project "' + selected + '"? This stops it (if running) and permanently removes its compose.yaml.')) return;
const btn = P.el('compose-action-delete');
btn.disabled = true;
const name = selected;
P.post('compose', 'remove', { project: selected }).then(function () {
selected = null;
P.toast('Deleted ' + name + '.', 'success');
return loadProjects();
}).catch(function (err) {
alert('Delete failed: ' + err.message);
P.toast('Delete failed: ' + err.message, 'error');
btn.disabled = false;
});
}