diff --git a/.gitignore b/.gitignore index 35f9ef908..6966ea248 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ dockerui +*.esproj* diff --git a/js/app.js b/js/app.js index 6dc3ce96b..983427fc7 100644 --- a/js/app.js +++ b/js/app.js @@ -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('DOCKER_API_VERSION', 'v1.4'); + .constant('UI_VERSION', 'v0.4') + .constant('DOCKER_API_VERSION', 'v1.8'); diff --git a/js/filters.js b/js/filters.js index 35969e815..c9c39c6f3 100644 --- a/js/filters.js +++ b/js/filters.js @@ -62,6 +62,22 @@ 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('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 20763a255..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) { @@ -15,4 +16,5 @@ function ContainerViewModel(data) { this.SizeRw = data.SizeRw; this.Status = data.Status; this.Checked = false; + this.Names = data.Names; } diff --git a/partials/container.html b/partials/container.html index cefefb8d9..a06a17e9f 100644 --- a/partials/container.html +++ b/partials/container.html @@ -1,6 +1,6 @@
-

Container: {{ container.Id }}

+

Container: {{ container.Name }}

diff --git a/partials/containers.html b/partials/containers.html index 1d3973274..c76af8905 100644 --- a/partials/containers.html +++ b/partials/containers.html @@ -22,22 +22,20 @@ Action - Id + Name Image Command Created - Size Status - {{ container.Id|truncate:10}} + {{ container|containername}} {{ container.Image }} {{ container.Command|truncate:40 }} {{ container.Created|getdate }} - {{ container.SizeRw|humansize }} {{ container.Status }} diff --git a/partials/dashboard.html b/partials/dashboard.html index 63602e608..f2f21ee0b 100644 --- a/partials/dashboard.html +++ b/partials/dashboard.html @@ -24,25 +24,21 @@

Status

- Get a better broswer... Your holding everyone back. + Get a better browser... Your holding everyone back.
-
-
+

Containers created

- Get a better broswer... Your holding everyone back. + Get a better browser... Your holding everyone back. -

{{ totalContainers }}

-

Images created

- Get a better broswer... Your holding everyone back. + Get a better browser... Your holding everyone back. -

{{ totalImages }}

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 }}