mirror of https://github.com/portainer/portainer
fix(k8s) trigger port validation while changing protocol (ce#394) (#4804)
Co-authored-by: Simon Meng <simon.meng@portainer.io>fix/ce-401-private-registry
parent
95894e8047
commit
d3086da139
|
@ -1299,7 +1299,7 @@
|
||||||
ng-min="1"
|
ng-min="1"
|
||||||
ng-max="65535"
|
ng-max="65535"
|
||||||
ng-required="!publishedPort.NeedsDeletion"
|
ng-required="!publishedPort.NeedsDeletion"
|
||||||
ng-change="ctrl.onChangePortMappingLoadBalancerPort()"
|
ng-change="ctrl.onChangePortMappingLoadBalancer()"
|
||||||
ng-disabled="ctrl.disableLoadBalancerEdit() || ctrl.isEditAndNotNewPublishedPort($index)"
|
ng-disabled="ctrl.disableLoadBalancerEdit() || ctrl.isEditAndNotNewPublishedPort($index)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -409,13 +409,14 @@ class KubernetesCreateApplicationController {
|
||||||
}
|
}
|
||||||
|
|
||||||
onChangePortProtocol(index) {
|
onChangePortProtocol(index) {
|
||||||
this.onChangePortMappingContainerPort();
|
|
||||||
if (this.formValues.PublishingType === KubernetesApplicationPublishingTypes.LOAD_BALANCER) {
|
if (this.formValues.PublishingType === KubernetesApplicationPublishingTypes.LOAD_BALANCER) {
|
||||||
const newPorts = _.filter(this.formValues.PublishedPorts, { IsNew: true });
|
const newPorts = _.filter(this.formValues.PublishedPorts, { IsNew: true });
|
||||||
_.forEach(newPorts, (port) => {
|
_.forEach(newPorts, (port) => {
|
||||||
port.Protocol = index ? this.formValues.PublishedPorts[index].Protocol : newPorts[0].Protocol;
|
port.Protocol = index ? this.formValues.PublishedPorts[index].Protocol : newPorts[0].Protocol;
|
||||||
});
|
});
|
||||||
|
this.onChangePortMappingLoadBalancer();
|
||||||
}
|
}
|
||||||
|
this.onChangePortMappingContainerPort();
|
||||||
}
|
}
|
||||||
/* #endregion */
|
/* #endregion */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue