Skip to content

Commit

Permalink
Merge pull request #7482 from swordqiu/hotfix/qj-create-vpc-ipv6-network
Browse files Browse the repository at this point in the history
fix: create vpc ipv6 network
  • Loading branch information
swordqiu authored Dec 27, 2024
2 parents 0f447a0 + 627ef16 commit 2e88cd3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
11 changes: 7 additions & 4 deletions containers/Network/views/network/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
<ip-subnets :decorator="decorators.ipSubnets" @clear-error="clearIpSubnetsError" />
</a-form-item>
<a-form-item :label="$t('network.text_575')" :extra="$t('network.text_578')" :vaidate-status="guestIpPrefixValidateStatus" :help="guestIpPrefixHelp" v-bind="formItemLayout" v-if="!show && !isGroupGuestIpPrefix">
<a-input v-decorator="decorators.guest_ip_prefix(0)" :placeholder="$t('network.ipv4.prefix.prompt')" />
<!-- <a-input v-decorator="decorators.guest_ip6_prefix(0)" :placeholder="$t('network.ipv6.prefix.prompt')" /> -->
<a-input v-decorator="decorators.guest_ip_prefix(0)" :placeholder="$t('network.ipv4.prefix.prompt')" v-if="curVpc.cidr_block" />
<a-input v-decorator="decorators.guest_ip6_prefix(0)" :placeholder="$t('network.ipv6.prefix.prompt')" v-if="curVpc.cidr_block6" />
</a-form-item>
<a-form-item :label="$t('network.text_575')" v-bind="formItemLayout" :validate-status="guestIpPrefixValidateStatus" :help="guestIpPrefixHelp" required v-if="isGroupGuestIpPrefix">
<template slot="extra">
Expand Down Expand Up @@ -96,7 +96,7 @@
<span class="count-tips">{{$t('network.text_169')}}<span class="remain-num">{{ remain }}</span>{{$t('network.text_170')}}</span>
</div>
</a-form-item>
<a-form-item label="dhcp_relay" :extra="$t('network.dhcp_tooltip')">
<a-form-item label="dhcp_relay" :extra="$t('network.dhcp_tooltip')" v-if="show">
<a-input class="w-50" v-decorator="decorators.guest_dhcp" :placeholder="$t('common.tips.input', ['IPv4'])" />
</a-form-item>
<a-form-item :label="$t('common_498')" v-if="isShowIsAutoAlloc">
Expand Down Expand Up @@ -754,7 +754,10 @@ export default {
}
} else if (this.cloudEnv === 'onpremise') {
if (item.cidr_block) {
return (<div>{ item.name }<span v-if="item.cidr_block">({ item.cidr_block })</span></div>)
if (item.cidr_block6) {
return (<div>{ item.name } ({ item.cidr_block }, { item.cidr_block6 })</div>)
}
return (<div>{ item.name } ({ item.cidr_block })</div>)
}
if (item.id === 'default') return (<div>{ item.name }<span v-if="item.cidr_block">({this.$t('common.text00047')})</span></div>)
}
Expand Down
2 changes: 1 addition & 1 deletion containers/Network/views/network/dialogs/ReversedIP.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default {
{
required: true, message: this.$t('network.text_646'),
},
{ validator: validateForm('IPv4'), message: this.$t('network.text_647') },
{ validator: validateForm(['IPv4', 'IPv6'], true, 'some'), message: this.$t('network.text_647') },
{ validator: this.ipBlur, trigger: ['change'] },
],
}]
Expand Down
6 changes: 6 additions & 0 deletions containers/Network/views/network/sidepage/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ export default {
},
},
]).filter(item => {
if (['wire', 'server_type', 'bgp_type', 'guest_dhcp', 'vlan_id'].indexOf(item.field) >= 0) {
if (this.data.cloud_env === 'onpremise' && this.data.is_classic) {
return true
}
return false
}
return !this.$isScopedPolicyMenuHidden(`network_hidden_columns.${item.field}`)
}),
},
Expand Down

0 comments on commit 2e88cd3

Please sign in to comment.