From b85797023638f37a90b144510598314c30b25cc3 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Thu, 14 Jul 2016 12:02:42 +1200 Subject: [PATCH 1/4] feat(ui): replace repository field with tags field in image view (#79) --- app/components/images/images.html | 6 ++++-- app/shared/filters.js | 8 ++++---- app/shared/viewmodel.js | 1 + assets/css/app.css | 8 ++++++++ 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/app/components/images/images.html b/app/components/images/images.html index bca8dc09e..c44f1a431 100644 --- a/app/components/images/images.html +++ b/app/components/images/images.html @@ -76,7 +76,7 @@ - Repository + Tags @@ -101,7 +101,9 @@ {{ image.Id|truncate:20}} - {{ image|repotag }} + + {{ tag }} + {{ image.VirtualSize|humansize }} {{ image.Created|getdate }} diff --git a/app/shared/filters.js b/app/shared/filters.js index f1e69027c..10fe596ff 100644 --- a/app/shared/filters.js +++ b/app/shared/filters.js @@ -142,17 +142,17 @@ angular.module('dockerui.filters', []) return _.split(container.Names[0], '/')[1]; }; }) -.filter('repotag', function () { +.filter('repotags', function () { 'use strict'; return function (image) { if (image.RepoTags && image.RepoTags.length > 0) { var tag = image.RepoTags[0]; if (tag === ':') { - tag = ''; + return []; } - return tag; + return image.RepoTags; } - return ''; + return []; }; }) .filter('getdate', function () { diff --git a/app/shared/viewmodel.js b/app/shared/viewmodel.js index 1b222692e..4b4e65cd8 100644 --- a/app/shared/viewmodel.js +++ b/app/shared/viewmodel.js @@ -1,4 +1,5 @@ function ImageViewModel(data) { + console.log(JSON.stringify(data, null, 4)); this.Id = data.Id; this.Tag = data.Tag; this.Repository = data.Repository; diff --git a/assets/css/app.css b/assets/css/app.css index 300c7a496..3921400ff 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -177,3 +177,11 @@ input[type="radio"] { .red-icon { color: #ae2323; } + +.image-tag { + margin-right: 5px; +} + +.widget .widget-body table tbody .image-tag { + font-size: 90% !important; +} From 8c769148adf50bcdb856455aa4e210c8ad36c686 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Thu, 14 Jul 2016 12:07:37 +1200 Subject: [PATCH 2/4] refactor(ui): remove console logging --- app/shared/viewmodel.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/shared/viewmodel.js b/app/shared/viewmodel.js index 4b4e65cd8..1b222692e 100644 --- a/app/shared/viewmodel.js +++ b/app/shared/viewmodel.js @@ -1,5 +1,4 @@ function ImageViewModel(data) { - console.log(JSON.stringify(data, null, 4)); this.Id = data.Id; this.Tag = data.Tag; this.Repository = data.Repository; From 30e9a604cde99b34731fdea21771a7af648488b5 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Thu, 14 Jul 2016 12:12:01 +1200 Subject: [PATCH 3/4] chore(version): bump version number --- app/app.js | 2 +- bower.json | 2 +- dockerui.go | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/app.js b/app/app.js index 586194607..0b7d4fa58 100644 --- a/app/app.js +++ b/app/app.js @@ -144,4 +144,4 @@ angular.module('uifordocker', [ .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('CONFIG_ENDPOINT', '/config') - .constant('UI_VERSION', 'v1.4.0'); + .constant('UI_VERSION', 'v1.5.0'); diff --git a/bower.json b/bower.json index f1e37a8f1..56800d37d 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "uifordocker", - "version": "1.4.0", + "version": "1.5.0", "homepage": "https://github.com/kevana/ui-for-docker", "authors": [ "Michael Crosby ", diff --git a/dockerui.go b/dockerui.go index 5f995f205..3cc089dbe 100644 --- a/dockerui.go +++ b/dockerui.go @@ -221,7 +221,7 @@ func csrfWrapper(h http.Handler) http.Handler { } func main() { - kingpin.Version("1.4.0") + kingpin.Version("1.5.0") kingpin.Parse() configuration := Config{ diff --git a/package.json b/package.json index 2fa2f25f0..829adeb49 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Michael Crosby & Kevan Ahlquist", "name": "uifordocker", "homepage": "https://github.com/kevana/ui-for-docker", - "version": "1.4.0", + "version": "1.5.0", "repository": { "type": "git", "url": "git@github.com:kevana/ui-for-docker.git" From 97f6a32c7867368d7bcf93b7d68c09a263268453 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Thu, 21 Jul 2016 11:14:29 +1200 Subject: [PATCH 4/4] fix(ui): config endpoint is available at config rather than /config --- app/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app.js b/app/app.js index 0b7d4fa58..5f49b6cdc 100644 --- a/app/app.js +++ b/app/app.js @@ -143,5 +143,5 @@ angular.module('uifordocker', [ // 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('CONFIG_ENDPOINT', '/config') + .constant('CONFIG_ENDPOINT', 'config') .constant('UI_VERSION', 'v1.5.0');