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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Show digest-pinned images as Pinned instead of Check failed
rcourtmanbaca15e6247e
diff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailSummary.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailSummary.tsxindex 91aa8599eb..eb9b3c3734 100644--- a/frontend-modern/src/components/Infrastructure/ResourceDetailSummary.tsx+++ b/frontend-modern/src/components/Infrastructure/ResourceDetailSummary.tsx@@ -2,6 +2,7 @@ import { For, Show } from 'solid-js';import type { Component } from 'solid-js';import type { Resource } from '@/types/resource';import { Card } from '@/components/shared/Card';+import { isContainerUpdatePinned } from '@/components/shared/containerUpdateBadgeModel';import { TagBadges } from '@/components/shared/TagBadges';import { formatBytes, formatRelativeTime, formatUptime } from '@/utils/format';import { formatInteger } from './resourceDetailMappers';@@ -85,6 +86,7 @@ const DockerContainerSummarySection: Component<{ docker: NonNullable<Resource['dconst updateState = () => {const update = updateStatus();if (!update) return '';+ if (isContainerUpdatePinned(update)) return 'Pinned digest';if (trimmedDockerValue(update.error)) return 'Check failed';return update.updateAvailable ? 'Available' : 'Current';};diff --git a/frontend-modern/src/components/shared/ContainerUpdateBadge.tsx b/frontend-modern/src/components/shared/ContainerUpdateBadge.tsxindex 8c62bc1632..490371e5b6 100644--- a/frontend-modern/src/components/shared/ContainerUpdateBadge.tsx+++ b/frontend-modern/src/components/shared/ContainerUpdateBadge.tsx@@ -5,11 +5,13 @@ import {getContainerUpdateBadgeTooltip,getContainerUpdateCurrentTooltip,getContainerUpdateErrorTooltip,+ getContainerUpdatePinnedTooltip,getUpdateButtonClass,getUpdateIconTooltip,hasContainerUpdate,hasContainerUpdateCurrent,hasContainerUpdateError,+ isContainerUpdatePinned,type ContainerUpdateBadgeProps,type UpdateButtonProps,type UpdateIconProps,@@ -76,6 +78,7 @@ export const ContainerUpdateBadge: Component<ContainerUpdateBadgeProps> = (propswhen={hasContainerUpdate(props.updateStatus) ||hasContainerUpdateError(props.updateStatus) ||+ isContainerUpdatePinned(props.updateStatus) ||(props.showCurrent && hasContainerUpdateCurrent(props.updateStatus))}>@@ -103,6 +106,22 @@ export const ContainerUpdateBadge: Component<ContainerUpdateBadgeProps> = (props</Show></span></Match>+ <Match when={isContainerUpdatePinned(props.updateStatus)}>+ <span+ class="inline-flex items-center justify-center gap-1 rounded-full bg-surface-alt px-1.5 py-0.5 text-[11px] font-medium text-muted cursor-help"+ aria-label={getContainerUpdatePinnedTooltip()}+ onMouseEnter={(e) => {+ const rect = e.currentTarget.getBoundingClientRect();+ showTooltip(getContainerUpdatePinnedTooltip(), rect.left + rect.width / 2, rect.top, {+ align: 'center',+ direction: 'up',+ });+ }}+ onMouseLeave={() => hideTooltip()}+ >+ <span>Pinned</span>+ </span>+ </Match><Match when={hasContainerUpdateError(props.updateStatus)}><spanclass="inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-xs font-medium bg-surface-alt text-muted cursor-help"@@ -200,6 +219,7 @@ export const UpdateButton: Component<UpdateButtonProps> = (props) => {state.currentState() === 'idle' &&(hasContainerUpdateError(props.updateStatus) ||hasContainerUpdateCurrent(props.updateStatus) ||+ isContainerUpdatePinned(props.updateStatus) ||(state.settingsLoaded() && state.shouldHideButton()));return (diff --git a/frontend-modern/src/components/shared/__tests__/ContainerUpdateBadge.test.tsx b/frontend-modern/src/components/shared/__tests__/ContainerUpdateBadge.test.tsxindex ee6e0240cb..d2c6ca3443 100644--- a/frontend-modern/src/components/shared/__tests__/ContainerUpdateBadge.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/ContainerUpdateBadge.test.tsx@@ -62,6 +62,41 @@ describe('ContainerUpdateBadge', () => {expect(screen.getByText('Check failed')).toBeInTheDocument();});+ it('renders the pinned badge instead of a failure for digest-pinned images', () => {+ render(() => (+ <ContainerUpdateBadge+ updateStatus={{+ updateAvailable: false,+ lastChecked: 0,+ error: 'digest-pinned image',+ }}+ />+ ));++ expect(screen.getByText('Pinned')).toBeInTheDocument();+ expect(screen.queryByText('Check failed')).not.toBeInTheDocument();+ });++ it('renders the pinned badge through the update button for digest-pinned images', () => {+ render(() => (+ <UpdateButton+ agentId="agent-1"+ containerId="container-1"+ containerName="backup"+ updateStatus={{+ updateAvailable: false,+ currentDigest: 'sha256:current',+ lastChecked: 0,+ error: 'digest-pinned image',+ }}+ />+ ));++ expect(screen.getByText('Pinned')).toBeInTheDocument();+ expect(screen.queryByText('Check failed')).not.toBeInTheDocument();+ expect(screen.queryByRole('button')).not.toBeInTheDocument();+ });+it('renders the update action button when an update is available', () => {render(() => (<UpdateButtondiff --git a/frontend-modern/src/components/shared/containerUpdateBadgeModel.ts b/frontend-modern/src/components/shared/containerUpdateBadgeModel.tsindex 90e2ef1cbb..99e3f090ea 100644--- a/frontend-modern/src/components/shared/containerUpdateBadgeModel.ts+++ b/frontend-modern/src/components/shared/containerUpdateBadgeModel.ts@@ -48,18 +48,31 @@ export function hasContainerUpdate(updateStatus?: DockerContainerUpdateStatus):return updateStatus?.updateAvailable === true;}+// Sentinel the agent reports for image@sha256 references, where there is no+// tag to resolve against the registry. Not a failure, so the surfaces render+// it as its own neutral state instead of "Check failed" (#1666).+const DIGEST_PINNED_SENTINEL = 'digest-pinned image';++export function isContainerUpdatePinned(updateStatus?: { error?: string }): boolean {+ return updateStatus?.error?.trim() === DIGEST_PINNED_SENTINEL;+}+export function hasContainerUpdateError(updateStatus?: DockerContainerUpdateStatus): boolean {- return Boolean(updateStatus?.error);+ return Boolean(updateStatus?.error) && !isContainerUpdatePinned(updateStatus);}export function hasContainerUpdateCurrent(updateStatus?: DockerContainerUpdateStatus): boolean {- return updateStatus?.updateAvailable === false && !hasContainerUpdateError(updateStatus);+ return updateStatus?.updateAvailable === false && !updateStatus?.error;}export function getContainerUpdateErrorTooltip(updateStatus?: DockerContainerUpdateStatus): string {return `Update check failed: ${updateStatus?.error || 'Unknown error'}`;}+export function getContainerUpdatePinnedTooltip(): string {+ return 'This image is pinned to a specific digest, so there is no newer tag to check against';+}+export function getContainerUpdateCurrentTooltip(updateStatus?: DockerContainerUpdateStatus,): string {diff --git a/frontend-modern/src/components/shared/useContainerUpdateButtonState.ts b/frontend-modern/src/components/shared/useContainerUpdateButtonState.tsindex e8609b1ed9..a1bbd982b9 100644--- a/frontend-modern/src/components/shared/useContainerUpdateButtonState.ts+++ b/frontend-modern/src/components/shared/useContainerUpdateButtonState.ts@@ -17,6 +17,7 @@ import {hasContainerUpdate,hasContainerUpdateCurrent,hasContainerUpdateError,+ isContainerUpdatePinned,type UpdateButtonProps,type UpdateState,} from './containerUpdateBadgeModel';@@ -74,6 +75,7 @@ export function useContainerUpdateButtonState(props: UpdateButtonProps) {hasContainerUpdate(props.updateStatus) ||hasContainerUpdateError(props.updateStatus) ||hasContainerUpdateCurrent(props.updateStatus) ||+ isContainerUpdatePinned(props.updateStatus) ||currentState() !== 'idle';// Server-evaluated refusal for the update capability (agent disconnected,diff --git a/frontend-modern/src/features/docker/DockerContainersTable.tsx b/frontend-modern/src/features/docker/DockerContainersTable.tsxindex e74f952b5c..1ee1c60334 100644--- a/frontend-modern/src/features/docker/DockerContainersTable.tsx+++ b/frontend-modern/src/features/docker/DockerContainersTable.tsx@@ -2,6 +2,7 @@ import { For, Show, createMemo, type Component, type JSX } from 'solid-js';import { useSearchParams } from '@solidjs/router';import type { FilterDef } from '@/components/shared/FilterBar';import { UpdateButton } from '@/components/shared/ContainerUpdateBadge';+import { isContainerUpdatePinned } from '@/components/shared/containerUpdateBadgeModel';import {GroupedTableModeSegmentedControl,type GroupedTableMode,@@ -137,6 +138,7 @@ const RESTART_ATTENTION_THRESHOLD = 5;const updateStatusLabel = (resource: Resource): string => {const update = resource.docker?.updateStatus;if (!update) return '—';+ if (isContainerUpdatePinned(update)) return 'Pinned';if (asTrimmedString(update.error)) return 'Error';return update.updateAvailable ? 'Available' : 'Current';};diff --git a/frontend-modern/src/features/docker/dockerImagePresentation.ts b/frontend-modern/src/features/docker/dockerImagePresentation.tsindex fb77971593..01ddf95cf2 100644--- a/frontend-modern/src/features/docker/dockerImagePresentation.ts+++ b/frontend-modern/src/features/docker/dockerImagePresentation.ts@@ -1,4 +1,5 @@import type { Resource } from '@/types/resource';+import { isContainerUpdatePinned } from '@/components/shared/containerUpdateBadgeModel';import { asTrimmedString } from '@/utils/stringUtils';export type DockerImageUpdateTone = 'danger' | 'warning' | 'success' | 'muted';@@ -57,7 +58,9 @@ export function getDockerImageOperationalPresentation(const updateStates = [image, ...consumers].map((resource) => resource.docker?.updateStatus).filter((state): state is NonNullable<typeof state> => state !== undefined);- const failed = updateStates.find((state) => trimmed(state.error).length > 0);+ const failed = updateStates.find(+ (state) => trimmed(state.error).length > 0 && !isContainerUpdatePinned(state),+ );if (failed) {return {@@ -77,6 +80,16 @@ export function getDockerImageOperationalPresentation(updateTone: 'warning',};}+ if (updateStates.some((state) => isContainerUpdatePinned(state))) {+ return {+ consumerCount,+ consumerSummary: summarizeConsumers(consumers, reportedCount),+ updateLabel: 'Pinned',+ updateDetail:+ 'The image is pinned to a specific digest, so there is no tag to check against.',+ updateTone: 'muted',+ };+ }if (updateStates.some((state) => state.updateAvailable === false)) {return {consumerCount,diff --git a/internal/mock/generator.go b/internal/mock/generator.goindex 9213c79b65..6a0325ada7 100644--- a/internal/mock/generator.go+++ b/internal/mock/generator.go@@ -4026,6 +4026,8 @@ func generateDockerContainers(hostName string, hostIdx int, config MockConfig, pNetworks: generateDockerNetworks(hostIdx, i),}+ container.UpdateStatus = generateDockerContainerUpdateStatus(now)+if pod != nil {container.Podman = &models.DockerPodmanContainer{PodName: pod.Name,@@ -4047,6 +4049,31 @@ func generateDockerContainers(hostName string, hostIdx int, config MockConfig, preturn containers}+// generateDockerContainerUpdateStatus mirrors the states the docker agent's+// registry checker reports: unchecked, current, update available, and the+// digest-pinned sentinel for image@sha256 references (no error states, since+// mock data also feeds the public demo).+func generateDockerContainerUpdateStatus(now time.Time) *models.DockerContainerUpdateStatus {+ roll := rand.Float64()+ if roll < 0.45 {+ return nil+ }+ status := &models.DockerContainerUpdateStatus{+ CurrentDigest: fmt.Sprintf("sha256:%016x%016x%016x%016x", rand.Uint64(), rand.Uint64(), rand.Uint64(), rand.Uint64()),+ LastChecked: now.Add(-time.Duration(10+rand.Intn(170)) * time.Minute),+ }+ switch {+ case roll < 0.50:+ status.Error = "digest-pinned image"+ case roll < 0.65:+ status.UpdateAvailable = true+ status.LatestDigest = fmt.Sprintf("sha256:%016x%016x%016x%016x", rand.Uint64(), rand.Uint64(), rand.Uint64(), rand.Uint64())+ default:+ status.LatestDigest = status.CurrentDigest+ }+ return status+}+func generateDockerPorts() []models.DockerContainerPort {if rand.Float64() < 0.45 {return nil