- versions.env pins podman, conmon, crun, netavark, aardvark-dns, passt, and fuse-overlayfs to verified upstream source checksums; SlackBuild recipes, scripts/build-packages.sh, checksums.sh, release.sh, and update-versions.sh implement the reproducible pipeline; GitHub Actions workflows build in a Slackware container and publish releases without committing any binaries. - plugin/podman.plg installs/updates/removes all eight packages (the seven components plus the plugin's own unraid-podman scaffolding package) via upgradepkg, using the official Unraid array-event hook mechanism (event/disks_mounted, event/stopping) instead of editing /boot/config/go. rc.podman and the sbin/ helper scripts implement storage creation, config seeding/sync, preflight checks, autostart with per-container Safe-Mode, and package verify/update/rollback. - webui/plugins/podman implements the Dashboard, Containers, Pods, Images, Volumes, Networks, Logs, Terminal, Compose, and Settings panels against the approved mockup (webui/mockups/prototype.html), talking to podman system service exclusively via PodmanClient.php (libpod REST API over the Unix socket), with two documented exceptions: Terminal's one-shot exec model and Compose's use of the podman compose CLI, since libpod has no REST equivalent for either. - docs/ARCHITECTURE.md and docs/ROADMAP.md record the design decisions and honest current status (syntax-checked, unit- and integration-tested against fake sockets/servers; not yet run against a real Unraid/Podman/Slackware system). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
53 lines
2.2 KiB
JavaScript
53 lines
2.2 KiB
JavaScript
/**
|
|
* javascript/dashboard.js
|
|
*
|
|
* Dashboard panel: summary stat tiles fed by ajax/system.php?action=summary.
|
|
* The Activity list and the CPU/Memory sparkline in the mockup were
|
|
* illustrative sample data with no backing API (libpod has no "recent
|
|
* events for a container fleet" convenience endpoint beyond raw
|
|
* /events streaming, which is a separate follow-up — see the note
|
|
* rendered in place of it below) — rather than fake data pretending to be
|
|
* live, this real implementation shows what's genuinely available now
|
|
* (the summary counts) and a clear placeholder for what needs the events
|
|
* stream, so nobody mistakes a mock for a working feature.
|
|
*/
|
|
(function () {
|
|
'use strict';
|
|
const P = window.Podman;
|
|
|
|
function render(summary) {
|
|
if (!summary.reachable) {
|
|
P.el('podman-panel-dashboard').innerHTML =
|
|
'<div class="podman-card"><div class="podman-error">' +
|
|
'Cannot reach the Podman API socket (' + P.escapeHtml(summary.socketPath) + '). ' +
|
|
'Is rc.podman running? Try <code>rc.podman status</code> from a terminal.' +
|
|
'</div></div>';
|
|
return;
|
|
}
|
|
|
|
P.el('stat-running').textContent = summary.containers.running;
|
|
P.el('stat-running-total').textContent = '/ ' + summary.containers.total;
|
|
P.el('stat-pods').textContent = summary.pods;
|
|
P.el('stat-images').textContent = summary.images;
|
|
P.el('stat-volumes').textContent = summary.volumes;
|
|
P.el('stat-networks').textContent = summary.networks;
|
|
P.el('stat-images-size').textContent = summary.storage.imagesSizeFormatted;
|
|
|
|
const meta = P.el('podman-header-meta');
|
|
if (meta) {
|
|
meta.innerHTML =
|
|
'<span class="dot-good">●</span> podman.sock connected' +
|
|
(summary.podmanVersion ? ' · v' + P.escapeHtml(summary.podmanVersion) : '') +
|
|
' · ' + summary.containers.running + ' of ' + summary.containers.total + ' containers running';
|
|
}
|
|
}
|
|
|
|
function load() {
|
|
return P.get('system', 'summary').then(render).catch(function (err) {
|
|
P.el('podman-panel-dashboard').innerHTML = '<div class="podman-card"><div class="podman-error">' + P.escapeHtml(err.message) + '</div></div>';
|
|
});
|
|
}
|
|
|
|
P.registerPanel('dashboard', { init: load, refresh: load });
|
|
})();
|