mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-11-16 05:46:14 +08:00
fix: label the VPC group of subnets without a VPC as None (#1210)
Kube-OVN sets a subnet's VPC (ovn-cluster when none is given), but a subnet it hasn't processed, such as one with an invalid provider, has none. The VPC page grouped those under "Virtual Private Cloud:" with an empty name, and its Create Subnet, Topology and actions buttons pointed at no VPC. Show None as the VPC name for that group and leave out its VPC buttons. Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
This commit is contained in:
@@ -139,7 +139,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
groupLabel(group) {
|
||||
return `${ this.t('harvester.vpc.label') }: ${ group.key }`;
|
||||
// Kube-OVN sets a subnet's VPC (ovn-cluster when none is given), so an empty one is a subnet it hasn't processed
|
||||
return `${ this.t('harvester.vpc.label') }: ${ group.key || this.t('generic.none') }`;
|
||||
},
|
||||
|
||||
slotName(vpc) {
|
||||
@@ -226,7 +227,10 @@ export default {
|
||||
{{ groupLabel(group) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div
|
||||
v-if="group.key"
|
||||
class="right"
|
||||
>
|
||||
<router-link
|
||||
v-if="isSubnetCreatable"
|
||||
class="btn btn-sm role-secondary mr-5"
|
||||
|
||||
Reference in New Issue
Block a user