Merge branch 'release/1.12.4'

pull/455/merge 1.12.4
Anthony Lapenna 2017-04-06 10:37:32 +02:00
commit 8e6272920b
5 changed files with 14 additions and 12 deletions

View File

@ -176,7 +176,7 @@ type (
const ( const (
// APIVersion is the version number of Portainer API. // APIVersion is the version number of Portainer API.
APIVersion = "1.12.3" APIVersion = "1.12.4"
// DBVersion is the version number of Portainer database. // DBVersion is the version number of Portainer database.
DBVersion = 1 DBVersion = 1
) )

View File

@ -594,4 +594,4 @@ angular.module('portainer', [
.constant('ENDPOINTS_ENDPOINT', 'api/endpoints') .constant('ENDPOINTS_ENDPOINT', 'api/endpoints')
.constant('TEMPLATES_ENDPOINT', 'api/templates') .constant('TEMPLATES_ENDPOINT', 'api/templates')
.constant('PAGINATION_MAX_ITEMS', 10) .constant('PAGINATION_MAX_ITEMS', 10)
.constant('UI_VERSION', 'v1.12.3'); .constant('UI_VERSION', 'v1.12.4');

View File

@ -157,7 +157,7 @@ function ($scope, $stateParams, $state, $location, $anchorScroll, Service, Servi
}; };
$scope.updateService = function updateService(service) { $scope.updateService = function updateService(service) {
$('#loadServicesSpinner').show(); $('#loadingViewSpinner').show();
var config = ServiceHelper.serviceToConfig(service.Model); var config = ServiceHelper.serviceToConfig(service.Model);
config.Name = service.Name; config.Name = service.Name;
config.Labels = translateServiceLabelsToLabels(service.ServiceLabels); config.Labels = translateServiceLabelsToLabels(service.ServiceLabels);
@ -198,11 +198,13 @@ function ($scope, $stateParams, $state, $location, $anchorScroll, Service, Servi
Window: service.RestartWindow Window: service.RestartWindow
}; };
if (service.Ports) {
service.Ports.forEach(function (binding) { service.Ports.forEach(function (binding) {
if (binding.PublishedPort === null || binding.PublishedPort === '') { if (binding.PublishedPort === null || binding.PublishedPort === '') {
delete binding.PublishedPort; delete binding.PublishedPort;
} }
}); });
}
config.EndpointSpec = { config.EndpointSpec = {
Mode: config.EndpointSpec.Mode || 'vip', Mode: config.EndpointSpec.Mode || 'vip',
@ -210,12 +212,12 @@ function ($scope, $stateParams, $state, $location, $anchorScroll, Service, Servi
}; };
Service.update({ id: service.Id, version: service.Version }, config, function (data) { Service.update({ id: service.Id, version: service.Version }, config, function (data) {
$('#loadServicesSpinner').hide(); $('#loadingViewSpinner').hide();
Messages.send("Service successfully updated", "Service updated"); Messages.send("Service successfully updated", "Service updated");
$scope.cancelChanges({}); $scope.cancelChanges({});
fetchServiceDetails(); fetchServiceDetails();
}, function (e) { }, function (e) {
$('#loadServicesSpinner').hide(); $('#loadingViewSpinner').hide();
Messages.error("Failure", e, "Unable to update service"); Messages.error("Failure", e, "Unable to update service");
}); });
}; };

View File

@ -1,6 +1,6 @@
{ {
"name": "portainer", "name": "portainer",
"version": "1.12.3", "version": "1.12.4",
"homepage": "https://github.com/portainer/portainer", "homepage": "https://github.com/portainer/portainer",
"authors": [ "authors": [
"Anthony Lapenna <anthony.lapenna at gmail dot com>" "Anthony Lapenna <anthony.lapenna at gmail dot com>"

View File

@ -2,7 +2,7 @@
"author": "Portainer.io", "author": "Portainer.io",
"name": "portainer", "name": "portainer",
"homepage": "http://portainer.io", "homepage": "http://portainer.io",
"version": "1.12.3", "version": "1.12.4",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git@github.com:portainer/portainer.git" "url": "git@github.com:portainer/portainer.git"