mirror of https://github.com/portainer/portainer
fix(k8s):fix difficulties selecting mixed protocols when creating k8s application EE-1073 (#5591)
* fix difficulties selecting mixed protocols when creating k8s applicationpull/5698/head
parent
ecc9813750
commit
deecbadce1
|
@ -1304,7 +1304,7 @@
|
|||
When publishing a port in cluster mode, the node port is optional. If left empty Kubernetes will use a random port number. If you wish to specify a port, use a
|
||||
port number inside the default range <code>30000-32767</code>.
|
||||
</div>
|
||||
<div ng-if="ctrl.isNotInternalAndHasNoPublishedPorts()" class="col-sm-12 small text-muted text-warning" style="margin-top: 12px;">
|
||||
<div ng-if="ctrl.isNotInternalAndHasNoPublishedPorts()" class="col-sm-12 small text-warning" style="margin-top: 12px;">
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> At least one published port must be defined.
|
||||
</div>
|
||||
|
||||
|
|
|
@ -790,15 +790,14 @@ class KubernetesCreateApplicationController {
|
|||
}
|
||||
|
||||
isEditLBWithPorts() {
|
||||
return this.formValues.PublishingType === KubernetesApplicationPublishingTypes.LOAD_BALANCER && _.filter(this.formValues.PublishedPorts, { IsNew: false }).length;
|
||||
return this.formValues.PublishingType === KubernetesApplicationPublishingTypes.LOAD_BALANCER && _.filter(this.formValues.PublishedPorts, { IsNew: false }).length === 0;
|
||||
}
|
||||
|
||||
isProtocolOptionDisabled(index, protocol) {
|
||||
return (
|
||||
this.disableLoadBalancerEdit() ||
|
||||
(this.isEditAndNotNewPublishedPort(index) && this.formValues.PublishedPorts[index].Protocol !== protocol) ||
|
||||
(this.isEditLBWithPorts() && this.formValues.PublishedPorts[index].Protocol !== protocol) ||
|
||||
(this.isNewAndNotFirst(index) && this.formValues.PublishedPorts[index].Protocol !== protocol)
|
||||
(this.isEditLBWithPorts() && this.formValues.PublishedPorts[index].Protocol !== protocol && this.isNewAndNotFirst(index))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue