Skip to content

Commit

Permalink
Merge remote-tracking branch 'apache/4.18'
Browse files Browse the repository at this point in the history
  • Loading branch information
shwstppr committed Dec 6, 2023
2 parents a6b5708 + 4c91cc7 commit b00fd6b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions ui/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,7 @@
"label.ipv6.dns1": "IPv6 DNS1",
"label.ipv6.dns2": "IPv6 DNS2",
"label.ipv6.subnets": "IPv6 Subnets",
"label.ip.addresses": "IP Addresses",
"label.iqn": "Target IQN",
"label.is.in.progress": "is in progress",
"label.is.shared": "Is shared",
Expand Down
8 changes: 7 additions & 1 deletion ui/src/components/view/ResourceView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<template v-for="tab in tabs" :key="tab.name">
<a-tab-pane
:key="tab.name"
:tab="$t('label.' + tab.name)"
:tab="$t('label.' + tabName(tab))"
v-if="showTab(tab)">
<keep-alive>
<component
Expand Down Expand Up @@ -158,6 +158,12 @@ export default {
)
this.$emit('onTabChange', key)
},
tabName (tab) {
if (typeof tab.name === 'function') {
return tab.name(this.resource)
}
return tab.name
},
showTab (tab) {
if (this.networkService && this.networkService.service && tab.networkServiceFilter) {
return tab.networkServiceFilter(this.networkService.service)
Expand Down
2 changes: 1 addition & 1 deletion ui/src/config/section/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default {
component: shallowRef(defineAsyncComponent(() => import('@/views/network/Ipv6FirewallRulesTab.vue'))),
show: (record, route, user) => { return record.type === 'Isolated' && ['IPv6', 'DualStack'].includes(record.internetprotocol) && !('vpcid' in record) && 'listIpv6FirewallRules' in store.getters.apis && (['Admin', 'DomainAdmin'].includes(user.roletype) || record.account === user.account || record.projectid) }
}, {
name: 'public.ip.addresses',
name: (record) => { return record.type === 'Shared' ? 'ip.addresses' : 'public.ip.addresses' },
component: shallowRef(defineAsyncComponent(() => import('@/views/network/IpAddressesTab.vue'))),
show: (record, route, user) => { return 'listPublicIpAddresses' in store.getters.apis && (record.type === 'Shared' || (record.type === 'Isolated' && !('vpcname' in record) && (['Admin', 'DomainAdmin'].includes(user.roletype) || record.account === user.account || record.projectid))) }
}, {
Expand Down

0 comments on commit b00fd6b

Please sign in to comment.