mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 08:19:40 +02:00
refactor(images): relocate tag/digest replacement
This commit is contained in:
parent
23b0d6f1dc
commit
d3a26a4ade
2 changed files with 10 additions and 12 deletions
|
@ -4,7 +4,17 @@ function ImageViewModel(data) {
|
|||
this.Repository = data.Repository;
|
||||
this.Created = data.Created;
|
||||
this.Checked = false;
|
||||
|
||||
this.RepoTags = data.RepoTags;
|
||||
if (!this.RepoTags && data.RepoDigests) {
|
||||
this.RepoTags = [];
|
||||
for (var i = 0; i < data.RepoDigests.length; i++) {
|
||||
var digest = data.RepoDigests[i];
|
||||
var repository = digest.substring(0, digest.indexOf('@'));
|
||||
this.RepoTags.push(repository + ':<none>');
|
||||
}
|
||||
}
|
||||
|
||||
this.VirtualSize = data.VirtualSize;
|
||||
this.ContainerCount = data.ContainerCount;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue