2019-03-21 05:46:49 +00:00
|
|
|
export function ImageDetailsViewModel(data) {
|
2017-03-20 11:01:35 +00:00
|
|
|
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.VirtualSize = data.VirtualSize;
|
|
|
|
this.DockerVersion = data.DockerVersion;
|
|
|
|
this.Os = data.Os;
|
|
|
|
this.Architecture = data.Architecture;
|
|
|
|
this.Author = data.Author;
|
2017-05-23 18:43:58 +00:00
|
|
|
this.Command = data.Config.Cmd;
|
2017-03-20 11:01:35 +00:00
|
|
|
this.Entrypoint = data.ContainerConfig.Entrypoint ? data.ContainerConfig.Entrypoint : '';
|
|
|
|
this.ExposedPorts = data.ContainerConfig.ExposedPorts ? Object.keys(data.ContainerConfig.ExposedPorts) : [];
|
|
|
|
this.Volumes = data.ContainerConfig.Volumes ? Object.keys(data.ContainerConfig.Volumes) : [];
|
|
|
|
this.Env = data.ContainerConfig.Env ? data.ContainerConfig.Env : [];
|
2021-01-11 02:35:19 +00:00
|
|
|
this.Labels = data.ContainerConfig.Labels;
|
2017-03-20 11:01:35 +00:00
|
|
|
}
|