mirror of https://github.com/rancher/ui.git
Only allow PNI to be selected if a network policy is selected
rancher/dashboard#4452
This commit is contained in:
parent
8882463d22
commit
38503c3640
|
|
@ -321,6 +321,10 @@ export default Component.extend(ClusterDriver, {
|
|||
if (networkPlugin === 'kubenet' && networkPolicy === 'azure') {
|
||||
set(this, 'config.networkPolicy', null);
|
||||
}
|
||||
|
||||
if (this.config.networkPolicy === null) {
|
||||
set(this, 'cluster.enableNetworkPolicy', false)
|
||||
}
|
||||
}),
|
||||
|
||||
resetIpRanges: observer('config.privateCluster', 'loadBalancerSku', function() {
|
||||
|
|
|
|||
|
|
@ -562,7 +562,7 @@
|
|||
<Input
|
||||
@type="checkbox"
|
||||
@checked={{mut cluster.enableNetworkPolicy}}
|
||||
@disabled={{editing}}
|
||||
@disabled={{or editing (not config.networkPolicy)}}
|
||||
/>
|
||||
{{t "clusterNew.rke.networkPolicy.label"}}
|
||||
{{#if editing}}
|
||||
|
|
@ -571,11 +571,20 @@
|
|||
@model={{t "clusterNew.rke.networkPolicy.editHelp"}}
|
||||
@tooltipTemplate="tooltip-static"
|
||||
@aria-describedby="tooltip-base"
|
||||
@tooltipFor="tooltipNetworkPolicy"
|
||||
@placement="top"
|
||||
>
|
||||
<i class="acc-label icon icon-info"></i>
|
||||
</TooltipElement>
|
||||
{{else if (not config.networkPolicy)}}
|
||||
<TooltipElement
|
||||
@type="tooltip-basic"
|
||||
@model={{t "clusterNew.rke.networkPolicy.selectNetworkPolicyHelp"}}
|
||||
@tooltipTemplate="tooltip-static"
|
||||
@aria-describedby="tooltip-base"
|
||||
@placement="top"
|
||||
>
|
||||
<i class="acc-label icon icon-info"></i>
|
||||
</TooltipElement>
|
||||
{{/if}}
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4649,6 +4649,7 @@ clusterNew:
|
|||
networkPolicy:
|
||||
label: Project Network Isolation
|
||||
editHelp: The Project Network Isolation option cannot be changed after the cluster is created
|
||||
selectNetworkPolicyHelp: You must have a Network Policy selected to use Project Network Isolation
|
||||
nodeName:
|
||||
detail: Optionally configure the node name as identification instead of the actual hostname
|
||||
placeholder: e.g. my-worker-node
|
||||
|
|
|
|||
Loading…
Reference in New Issue