Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Surface host OS family in Docker SYSTEM column

rcourtman6708c6a2c773
diff --git a/frontend-modern/src/features/docker/__tests__/dockerPageModel.test.ts b/frontend-modern/src/features/docker/__tests__/dockerPageModel.test.ts
index 2f12f388dc..9c3137049b 100644
--- a/frontend-modern/src/features/docker/__tests__/dockerPageModel.test.ts
+++ b/frontend-modern/src/features/docker/__tests__/dockerPageModel.test.ts
@@ -165,6 +165,32 @@ describe('dockerPageModel', () => {
expect(badges['app-container:plain-docker']).toBeUndefined();
});
+ it('surfaces the host OS family as the system badge for plain Docker hosts', () => {
+ const debianHost = makeResource({
+ id: 'docker-host-debian',
+ type: 'agent',
+ name: 'edge-apps-01',
+ docker: { os: 'Debian GNU/Linux 12 (bookworm)', kernelVersion: '6.8.12-1-amd64' },
+ });
+ const alpineHost = makeResource({
+ id: 'docker-host-alpine',
+ type: 'agent',
+ name: 'edge-apps-02',
+ docker: { os: 'Alpine Linux 3.19' },
+ });
+ const ubuntuHost = makeResource({
+ id: 'docker-host-ubuntu',
+ type: 'agent',
+ name: 'ops-services-01',
+ docker: { os: 'Ubuntu 24.04.1 LTS' },
+ });
+
+ expect(getDockerHostSystemBadge(debianHost)?.label).toBe('Debian');
+ expect(getDockerHostSystemBadge(debianHost)?.title).toBe('Debian GNU/Linux 12 (bookworm)');
+ expect(getDockerHostSystemBadge(alpineHost)?.label).toBe('Alpine');
+ expect(getDockerHostSystemBadge(ubuntuHost)?.label).toBe('Ubuntu');
+ });
+
it('does not treat standalone inactive Docker Swarm metadata as Swarm evidence', () => {
expect(
hasDockerSwarmEvidence(
diff --git a/frontend-modern/src/utils/resourceBadgePresentation.ts b/frontend-modern/src/utils/resourceBadgePresentation.ts
index 34cf56f4ca..77368cc37b 100644
--- a/frontend-modern/src/utils/resourceBadgePresentation.ts
+++ b/frontend-modern/src/utils/resourceBadgePresentation.ts
@@ -371,6 +371,36 @@ const getHostOsLabel = (...values: string[]): string | null => {
return null;
};
+const getDockerHostOsIdentityBadge = (resource: Resource): ResourceBadge | null => {
+ const docker = resource.docker;
+ if (!docker) return null;
+ const osName = trimString(docker.os);
+ if (!osName) return null;
+
+ const knownSource = getKnownHostIdentitySource('', osName);
+ if (knownSource) {
+ const badge = getSourcePlatformBadge(knownSource);
+ if (badge) {
+ return {
+ label: badge.label,
+ classes: badge.classes,
+ title: titleFromParts(osName, badge.title) ?? badge.title,
+ };
+ }
+ }
+
+ const osLabel = getHostOsLabel(osName);
+ if (osLabel) {
+ return {
+ label: osLabel,
+ classes: `${baseBadge} ${typeClasses}`,
+ title: osName,
+ };
+ }
+
+ return null;
+};
+
const getAgentSystemIdentityBadge = (resource: Resource): ResourceBadge | null => {
const agent = getAgentRecord(resource);
if (!agent) return null;
@@ -646,6 +676,11 @@ export function getInfrastructureSystemIdentityBadges(resource: Resource): Resou
return [agentIdentityBadge];
}
+ const dockerOsBadge = getDockerHostOsIdentityBadge(resource);
+ if (dockerOsBadge) {
+ return [dockerOsBadge];
+ }
+
if (
resource.platformType === 'docker' ||
resource.type === 'docker-host' ||