1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

Add container naming to container display

This commit is contained in:
Michael Crosby 2013-12-13 10:05:35 -08:00
parent 2946a97f41
commit e3f804ef88
4 changed files with 10 additions and 5 deletions

View file

@ -14,5 +14,5 @@ angular.module('dockerui', ['dockerui.services', 'dockerui.filters'])
// You need to set this to the api endpoint without the port i.e. http://192.168.1.9
.constant('DOCKER_ENDPOINT', '/dockerapi')
.constant('DOCKER_PORT', '') // Docker port, leave as an empty string if no port is requred. If you have a port, prefix it with a ':' i.e. :4243
.constant('UI_VERSION', 'v0.3')
.constant('UI_VERSION', 'v0.4')
.constant('DOCKER_API_VERSION', 'v1.4');

View file

@ -62,6 +62,12 @@ angular.module('dockerui.filters', [])
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[[i]];
};
})
.filter('containername', function() {
return function(container) {
var name = container.Names[0];
return name.substring(1, name.length);
};
})
.filter('getdate', function() {
return function(data) {

View file

@ -15,4 +15,5 @@ function ContainerViewModel(data) {
this.SizeRw = data.SizeRw;
this.Status = data.Status;
this.Checked = false;
this.Names = data.Names;
}