Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions app/model/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface ContainerResult {
digest?: string;
created?: string;
link?: string;
labels?: Record<string, string>; // Labels from the new image (for version display)
}

export interface ContainerUpdateKind {
Expand Down Expand Up @@ -322,6 +323,20 @@ function addUpdateKindProperty(container: Container) {
updateKind.localValue = container.image.tag.value;
updateKind.remoteValue = container.result.tag;
updateKind.semverDiff = semverDiffWud;
} else if (
// Check for version labels in rolling release containers first
// where tags are identical but versions differ
container.result.labels &&
(container.result.labels['io.hass.version'] ||
container.result.labels['org.opencontainers.image.version'] ||
container.result.labels['org.label-schema.version'] ||
container.result.labels['version'] ||
container.result.labels['build_version'])
) {
// Force tag update kind to enable version formatting in frontend
updateKind.kind = 'tag';
updateKind.localValue = container.image.tag.value;
updateKind.remoteValue = container.result.tag;
} else if (
container.image.digest &&
container.image.digest.value !== container.result.digest
Expand Down
19 changes: 15 additions & 4 deletions ui/src/components/ContainerItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,21 @@ export default defineComponent({
);
}
if (this.container.updateKind) {
newVersion = this.container.updateKind.remoteValue;
}
if (this.container.updateKind.kind === "digest") {
newVersion = (this as any).$filters.short(newVersion, 15);
if (this.container.updateKind.kind === "tag") {
// For tag updates, use version formatting
const version = extractVersionFromLabels(this.container.result?.labels);
if (version) {
// If we have version info, show tag with version
newVersion = `${this.container.updateKind.remoteValue} (${version})`;
} else {
// No version info, just show the tag
newVersion = this.container.updateKind.remoteValue;
}
} else if (this.container.updateKind.kind === "digest") {
newVersion = (this as any).$filters.short(this.container.updateKind.remoteValue, 15);
} else {
newVersion = this.container.updateKind.remoteValue;
}
}
return newVersion;
},
Expand Down