File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,16 +145,21 @@ export default {
145145 return
146146 }
147147
148- // VPC IPs with static nat keep existing VPN behavior and always show firewall
148+ // VPC IPs with static nat keep existing VPN behavior; show firewall only when capability exists
149149 if (this .resource .isstaticnat ) {
150- const tabs = this .addFirewallTab (this .$route .meta .tabs ).map (tab => {
151- if (tab .name !== ' firewall' ) {
152- return tab
153- }
154- const staticNatFirewallTab = { ... tab }
155- delete staticNatFirewallTab .networkServiceFilter
156- return staticNatFirewallTab
157- })
150+ let tabs = this .$route .meta .tabs
151+ if (hasFirewallCapability) {
152+ tabs = this .addFirewallTab (tabs).map (tab => {
153+ if (tab .name !== ' firewall' ) {
154+ return tab
155+ }
156+ const staticNatFirewallTab = { ... tab }
157+ delete staticNatFirewallTab .networkServiceFilter
158+ return staticNatFirewallTab
159+ })
160+ } else {
161+ tabs = tabs .filter (tab => tab .name !== ' firewall' )
162+ }
158163 this .tabs = tabs
159164 return
160165 }
You can’t perform that action at this time.
0 commit comments