mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
Some checks failed
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
ci / build_images (map[arch:arm platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:s390x platform:linux version:]) (push) Has been cancelled
/ triage (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Test / test-client (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:linux]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
Test / test-server (map[arch:arm64 platform:linux]) (push) Has been cancelled
ci / build_manifests (push) Has been cancelled
* fix(app/volume): make optional Container and ContainerConfig fields removed in docker 26 * fix(app/image): use image.Size instead of image.VirtualSize removed in Docker 25
27 lines
991 B
JavaScript
27 lines
991 B
JavaScript
export function ImageDetailsViewModel(data) {
|
|
this.Id = data.Id;
|
|
this.Tag = data.Tag;
|
|
this.Parent = data.Parent;
|
|
this.Repository = data.Repository;
|
|
this.Created = data.Created;
|
|
this.Checked = false;
|
|
this.RepoTags = data.RepoTags;
|
|
this.Size = data.Size;
|
|
this.DockerVersion = data.DockerVersion;
|
|
this.Os = data.Os;
|
|
this.Architecture = data.Architecture;
|
|
this.Author = data.Author;
|
|
this.Command = data.Config.Cmd;
|
|
|
|
let config = {};
|
|
if (data.Config) {
|
|
config = data.Config; // this is part of OCI images-spec
|
|
} else if (data.ContainerConfig != null) {
|
|
config = data.ContainerConfig; // not OCI ; has been removed in Docker 26 (API v1.45) along with .Container
|
|
}
|
|
this.Entrypoint = config.Entrypoint ? config.Entrypoint : '';
|
|
this.ExposedPorts = config.ExposedPorts ? Object.keys(config.ExposedPorts) : [];
|
|
this.Volumes = config.Volumes ? Object.keys(config.Volumes) : [];
|
|
this.Env = config.Env ? config.Env : [];
|
|
this.Labels = config.Labels;
|
|
}
|