Fix images repo name

pull/2/head
Michael Crosby 11 years ago
parent a392c8ec87
commit 27a9e97062

@ -69,6 +69,16 @@ angular.module('dockerui.filters', [])
return name.substring(1, name.length); 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 == '<none>:<none>') { tag = ''; }
return tag;
}
return '';
};
})
.filter('getdate', function() { .filter('getdate', function() {
return function(data) { return function(data) {
//Multiply by 1000 for the unix format //Multiply by 1000 for the unix format

@ -5,6 +5,7 @@ function ImageViewModel(data) {
this.Repository = data.Repository; this.Repository = data.Repository;
this.Created = data.Created; this.Created = data.Created;
this.Checked = false; this.Checked = false;
this.RepoTags = data.RepoTags;
} }
function ContainerViewModel(data) { function ContainerViewModel(data) {

@ -23,8 +23,8 @@
<tbody> <tbody>
<tr ng-repeat="image in images | orderBy:predicate"> <tr ng-repeat="image in images | orderBy:predicate">
<td><input type="checkbox" ng-model="image.Checked" /></td> <td><input type="checkbox" ng-model="image.Checked" /></td>
<td><a href="/#/images/{{ image.Id }}/?tag={{ image.Repository }}:{{ image.Tag }}">{{ image.Id|truncate:20}}</a></td> <td><a href="/#/images/{{ image.Id }}/?tag={{ image|repotag }}">{{ image.Id|truncate:20}}</a></td>
<td>{{ image.Repository }}:{{ image.Tag }}</td> <td>{{ image|repotag }}</td>
<td>{{ image.Created|getdate }}</td> <td>{{ image.Created|getdate }}</td>
</tr> </tr>
</tbody> </tbody>

Loading…
Cancel
Save