fix(k8s) trigger port validation while changing protocol (ce#394)

pull/4804/head
Simon Meng 2021-02-02 14:01:51 +13:00
parent 81de55fedd
commit 58125a5a0a
2 changed files with 3 additions and 2 deletions

View File

@ -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)"
/>
</div>

View File

@ -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 */