From 714f515f0be4bb4feaae9cdebc5da174d702bfe4 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Fri, 11 Nov 2016 15:50:59 +1300 Subject: [PATCH 1/5] chore(build-system): fix build script --- build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sh b/build.sh index f005be328..1d4a75cc9 100755 --- a/build.sh +++ b/build.sh @@ -18,12 +18,14 @@ rm -rf /tmp/portainer-build-win && mkdir -pv /tmp/portainer-build-win/portainer mv dist/* /tmp/portainer-build-win/portainer cd /tmp/portainer-build-win tar cvpfz portainer-${VERSION}-windows-amd64.tar.gz portainer +cd - grunt release-arm rm -rf /tmp/portainer-build-arm && mkdir -pv /tmp/portainer-build-arm/portainer mv dist/* /tmp/portainer-build-arm/portainer cd /tmp/portainer-build-arm tar cvpfz portainer-${VERSION}-linux-arm.tar.gz portainer +cd - grunt release-macos rm -rf /tmp/portainer-build-darwin && mkdir -pv /tmp/portainer-build-darwin/portainer From 2c49d3b5d92b128a9ae9d99bd8dcf380d0dffa3b Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Sat, 12 Nov 2016 12:51:06 +1300 Subject: [PATCH 2/5] docs(README): add a donate badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6f778276e..47a495dad 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ [![Microbadger](https://images.microbadger.com/badges/image/portainer/portainer.svg)](http://microbadger.com/images/portainer/portainer "Image size") [![Documentation Status](https://readthedocs.org/projects/portainer/badge/?version=latest)](http://portainer.readthedocs.io/en/latest/?badge=latest) [![Gitter](https://badges.gitter.im/portainer/Lobby.svg)](https://gitter.im/portainer/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHXZJQNJQ36H6) **_Portainer_** is a lightweight management UI which allows you to **easily** manage your Docker host or Swarm cluster. From 643769d4a688081469f8f1af52f0b9fbc457dc8a Mon Sep 17 00:00:00 2001 From: Rob Brazier Date: Wed, 16 Nov 2016 01:52:05 +0000 Subject: [PATCH 3/5] feat(container-creation): add the ability to use container as a network --- .../createContainerController.js | 43 ++++++++++++++++--- .../createContainer/createcontainer.html | 15 ++++++- 2 files changed, 51 insertions(+), 7 deletions(-) diff --git a/app/components/createContainer/createContainerController.js b/app/components/createContainer/createContainerController.js index 257062b97..9ea9ac735 100644 --- a/app/components/createContainer/createContainerController.js +++ b/app/components/createContainer/createContainerController.js @@ -1,12 +1,13 @@ angular.module('createContainer', []) -.controller('CreateContainerController', ['$scope', '$state', '$stateParams', 'Config', 'Info', 'Container', 'Image', 'Volume', 'Network', 'Messages', -function ($scope, $state, $stateParams, Config, Info, Container, Image, Volume, Network, Messages) { +.controller('CreateContainerController', ['$scope', '$state', '$stateParams', '$filter', 'Config', 'Info', 'Container', 'ContainerHelper', 'Image', 'Volume', 'Network', 'Messages', +function ($scope, $state, $stateParams, $filter, Config, Info, Container, ContainerHelper, Image, Volume, Network, Messages) { $scope.formValues = { alwaysPull: true, Console: 'none', Volumes: [], - Registry: '' + Registry: '', + NetworkContainer: '' }; $scope.imageConfig = {}; @@ -51,12 +52,13 @@ function ($scope, $state, $stateParams, Config, Info, Container, Image, Volume, }; Config.$promise.then(function (c) { - var swarm = c.swarm; + $scope.swarm = c.swarm; Info.get({}, function(info) { - if (swarm && !_.startsWith(info.ServerVersion, 'swarm')) { + if ($scope.swarm && !_.startsWith(info.ServerVersion, 'swarm')) { $scope.swarm_mode = true; } }); + var containersToHideLabels = c.hiddenLabels; Volume.query({}, function (d) { $scope.availableVolumes = d.Volumes; @@ -66,7 +68,7 @@ function ($scope, $state, $stateParams, Config, Info, Container, Image, Volume, Network.query({}, function (d) { var networks = d; - if (swarm) { + if ($scope.swarm) { networks = d.filter(function (network) { if (network.Scope === 'global') { return network; @@ -77,6 +79,7 @@ function ($scope, $state, $stateParams, Config, Info, Container, Image, Volume, networks.push({Name: "host"}); networks.push({Name: "none"}); } + networks.push({Name: "container"}); $scope.availableNetworks = networks; if (!_.find(networks, {'Name': 'bridge'})) { $scope.config.HostConfig.NetworkMode = 'nat'; @@ -84,6 +87,16 @@ function ($scope, $state, $stateParams, Config, Info, Container, Image, Volume, }, function (e) { Messages.error("Failure", e, "Unable to retrieve networks"); }); + + Container.query({}, function (d) { + var containers = d; + if (containersToHideLabels) { + containers = ContainerHelper.hideContainers(d, containersToHideLabels); + } + $scope.runningContainers = containers; + }, function(e) { + Messages.error("Failure", e, "Unable to retrieve running containers"); + }); }); // TODO: centralize, already present in templatesController @@ -217,8 +230,26 @@ function ($scope, $state, $stateParams, Config, Info, Container, Image, Volume, config.Volumes = volumes; } + function prepareNetworkConfig(config) { + var mode = config.HostConfig.NetworkMode; + var container = $scope.formValues.NetworkContainer; + var containerName = container; + if (container && typeof container === 'object') { + containerName = $filter('trimcontainername')(container.Names[0]); + if ($scope.swarm && !$scope.swarm_mode) { + containerName = $filter('swarmcontainername')(container); + } + } + var networkMode = mode; + if (containerName) { + networkMode += ':' + containerName; + } + config.HostConfig.NetworkMode = networkMode; + } + function prepareConfiguration() { var config = angular.copy($scope.config); + prepareNetworkConfig(config); prepareImageConfig(config); preparePortBindings(config); prepareConsole(config); diff --git a/app/components/createContainer/createcontainer.html b/app/components/createContainer/createcontainer.html index da82309d0..795ecfefa 100644 --- a/app/components/createContainer/createcontainer.html +++ b/app/components/createContainer/createcontainer.html @@ -267,13 +267,26 @@
-
+ +
+ +
+ + +
+
+
From 3db487f386c64ac74e7e72367742ffccb69abbf9 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Wed, 16 Nov 2016 19:16:50 +0900 Subject: [PATCH 4/5] fix(service-details): fix a sorting issue when ordering by last update (#350) --- app/components/service/service.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/components/service/service.html b/app/components/service/service.html index cff6692a5..175604154 100644 --- a/app/components/service/service.html +++ b/app/components/service/service.html @@ -181,10 +181,10 @@ - + Last update - - + + From 2d35ac8f82a59f9f79d7ac1402ebb7e8034a1a55 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Wed, 16 Nov 2016 23:17:39 +1300 Subject: [PATCH 5/5] chore(version): bump version number --- api/main.go | 2 +- app/app.js | 2 +- bower.json | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/main.go b/api/main.go index db8880480..fab02cf04 100644 --- a/api/main.go +++ b/api/main.go @@ -6,7 +6,7 @@ import ( // main is the entry point of the program func main() { - kingpin.Version("1.10.0") + kingpin.Version("1.10.1") var ( endpoint = kingpin.Flag("host", "Dockerd endpoint").Default("unix:///var/run/docker.sock").Short('H').String() addr = kingpin.Flag("bind", "Address and port to serve Portainer").Default(":9000").Short('p').String() diff --git a/app/app.js b/app/app.js index 3a789fd9c..cf692c341 100644 --- a/app/app.js +++ b/app/app.js @@ -188,4 +188,4 @@ angular.module('portainer', [ .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', 'settings') .constant('TEMPLATES_ENDPOINT', 'templates') - .constant('UI_VERSION', 'v1.10.0'); + .constant('UI_VERSION', 'v1.10.1'); diff --git a/bower.json b/bower.json index 3ade321fe..efd0e8d09 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "portainer", - "version": "1.10.0", + "version": "1.10.1", "homepage": "https://github.com/portainer/portainer", "authors": [ "Anthony Lapenna " diff --git a/package.json b/package.json index 2ab8792cc..6ac921697 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Portainer.io", "name": "portainer", "homepage": "http://portainer.io", - "version": "1.10.0", + "version": "1.10.1", "repository": { "type": "git", "url": "git@github.com:portainer/portainer.git"