Skip to content

Commit 471b134

Browse files
UI fix for VPC no firewall
1 parent aba75f3 commit 471b134

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

ui/src/views/network/PublicIpResource.vue

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)