diff --git a/js/filters.js b/js/filters.js index 4be249519..c9c39c6f3 100644 --- a/js/filters.js +++ b/js/filters.js @@ -68,6 +68,16 @@ angular.module('dockerui.filters', []) var name = container.Names[0]; return name.substring(1, name.length); }; + }) + .filter('repotag', function() { + return function(image) { + if (image.RepoTags && image.RepoTags.length > 0) { + var tag = image.RepoTags[0]; + if (tag == ':') { tag = ''; } + return tag; + } + return ''; + }; }) .filter('getdate', function() { return function(data) { diff --git a/js/viewmodel.js b/js/viewmodel.js index f8578a879..7a17b21e9 100644 --- a/js/viewmodel.js +++ b/js/viewmodel.js @@ -5,6 +5,7 @@ function ImageViewModel(data) { this.Repository = data.Repository; this.Created = data.Created; this.Checked = false; + this.RepoTags = data.RepoTags; } function ContainerViewModel(data) { diff --git a/partials/images.html b/partials/images.html index 7751b5d07..e93a6fa3a 100644 --- a/partials/images.html +++ b/partials/images.html @@ -23,8 +23,8 @@ - {{ image.Id|truncate:20}} - {{ image.Repository }}:{{ image.Tag }} + {{ image.Id|truncate:20}} + {{ image|repotag }} {{ image.Created|getdate }}