From d2d7f6fdb9bd98622e9653798cd233a656902652 Mon Sep 17 00:00:00 2001 From: yi-portainer Date: Tue, 2 Feb 2021 22:37:37 +1300 Subject: [PATCH] Squashed commit of the following: commit e4605d990d06a6cb9a104ab3348e6ecac3c4c533 Author: yi-portainer Date: Tue Feb 2 17:42:57 2021 +1300 * update portainer version commit 768697157c9f724fb7aad0d028864febbb0235f9 Author: LP B Date: Tue Feb 2 05:00:19 2021 +0100 sec(app): remove unused and vulnerable dependencies (#4801) commit d3086da139b955a075261d37ee9559f3b3b5be80 Author: cong meng Date: Tue Feb 2 15:10:06 2021 +1300 fix(k8s) trigger port validation while changing protocol (ce#394) (#4804) Co-authored-by: Simon Meng commit 95894e80477a2f6fb105b9f4f6b4dbdc8613ae51 Author: cong meng Date: Tue Feb 2 15:03:11 2021 +1300 fix(k8s) parse empty configuration as empty string yaml instead of {} (ce#395) (#4805) Co-authored-by: Simon Meng commit 81de55fedd3227bf43d21bec527e9702dfaa118b Author: Yi Chen <69284638+yi-portainer@users.noreply.github.com> Date: Tue Feb 2 11:12:40 2021 +1300 * fix missing kubectl download (#4802) commit 84827b8782b5aa6bdcc6a5a23b7a8449f2556151 Author: Steven Kang Date: Sun Jan 31 17:32:30 2021 +1300 feat(build): introducing buildx for Windows (#4792) * feat(build): introducing buildx for Windows * feat(build): re-ordered USER * feat(build): Fixed Typo * feat(build): fixed typo --- api/portainer.go | 2 +- app/kubernetes/helpers/configurationHelper.js | 2 ++ .../views/applications/create/createApplication.html | 2 +- .../views/applications/create/createApplicationController.js | 3 ++- build/download_kubectl_binary.sh | 4 ++-- package.json | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/api/portainer.go b/api/portainer.go index 1de9e2816..00e1c32de 100644 --- a/api/portainer.go +++ b/api/portainer.go @@ -1125,7 +1125,7 @@ type ( const ( // APIVersion is the version number of the Portainer API - APIVersion = "2.0.1" + APIVersion = "2.1.0" // DBVersion is the version number of the Portainer database DBVersion = 25 // ComposeSyntaxMaxVersion is a maximum supported version of the docker compose syntax diff --git a/app/kubernetes/helpers/configurationHelper.js b/app/kubernetes/helpers/configurationHelper.js index e15929195..3946484ce 100644 --- a/app/kubernetes/helpers/configurationHelper.js +++ b/app/kubernetes/helpers/configurationHelper.js @@ -52,6 +52,8 @@ class KubernetesConfigurationHelper { } static parseData(formValues) { + if (!formValues.Data.length) return ''; + const data = _.reduce( formValues.Data, (acc, entry) => { diff --git a/app/kubernetes/views/applications/create/createApplication.html b/app/kubernetes/views/applications/create/createApplication.html index 61b16176c..627aaf510 100644 --- a/app/kubernetes/views/applications/create/createApplication.html +++ b/app/kubernetes/views/applications/create/createApplication.html @@ -1299,7 +1299,7 @@ ng-min="1" ng-max="65535" ng-required="!publishedPort.NeedsDeletion" - ng-change="ctrl.onChangePortMappingLoadBalancerPort()" + ng-change="ctrl.onChangePortMappingLoadBalancer()" ng-disabled="ctrl.disableLoadBalancerEdit() || ctrl.isEditAndNotNewPublishedPort($index)" /> diff --git a/app/kubernetes/views/applications/create/createApplicationController.js b/app/kubernetes/views/applications/create/createApplicationController.js index e6347e597..a0b3a32c1 100644 --- a/app/kubernetes/views/applications/create/createApplicationController.js +++ b/app/kubernetes/views/applications/create/createApplicationController.js @@ -409,13 +409,14 @@ class KubernetesCreateApplicationController { } onChangePortProtocol(index) { - this.onChangePortMappingContainerPort(); if (this.formValues.PublishingType === KubernetesApplicationPublishingTypes.LOAD_BALANCER) { const newPorts = _.filter(this.formValues.PublishedPorts, { IsNew: true }); _.forEach(newPorts, (port) => { port.Protocol = index ? this.formValues.PublishedPorts[index].Protocol : newPorts[0].Protocol; }); + this.onChangePortMappingLoadBalancer(); } + this.onChangePortMappingContainerPort(); } /* #endregion */ diff --git a/build/download_kubectl_binary.sh b/build/download_kubectl_binary.sh index 32215bace..4b9714244 100755 --- a/build/download_kubectl_binary.sh +++ b/build/download_kubectl_binary.sh @@ -4,8 +4,6 @@ PLATFORM=$1 ARCH=$2 KUBECTL_VERSION=$3 -exit 0 - if [ "${PLATFORM}" == 'linux' ]; then wget -O "dist/kubectl" "https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/${PLATFORM}/${ARCH}/kubectl" chmod +x "dist/kubectl" @@ -13,3 +11,5 @@ elif [ "${PLATFORM}" == 'windows' ]; then wget -O "dist/kubectl.exe" "https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/windows/amd64/kubectl.exe" chmod +x "dist/kubectl.exe" fi + +exit 0 diff --git a/package.json b/package.json index a04f5385f..e7cac55e7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Portainer.io", "name": "portainer", "homepage": "http://portainer.io", - "version": "2.0.0", + "version": "2.1.0", "repository": { "type": "git", "url": "git@github.com:portainer/portainer.git"