diff --git a/src/locales/en.json b/src/locales/en.json index 6616cddb..8aef867f 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -494,6 +494,7 @@ "Debian": "Debian", "Dedicated": "Dedicated", "Default Policy": "Default Policy", + "Default is slaac, for details, see https://docs.openstack.org/neutron/latest/admin/config-ipv6.html": "Default is slaac, for details, see https://docs.openstack.org/neutron/latest/admin/config-ipv6.html", "Degraded": "Degraded", "Delay Interval(s)": "Delay Interval(s)", "Delete": "Delete", diff --git a/src/locales/zh.json b/src/locales/zh.json index 8e6eeac4..2969b527 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -494,6 +494,7 @@ "Debian": "", "Dedicated": "专用", "Default Policy": "默认策略", + "Default is slaac, for details, see https://docs.openstack.org/neutron/latest/admin/config-ipv6.html": "默认使用slaac模式,详细配置方式请查看 https://docs.openstack.org/neutron/latest/admin/config-ipv6.html", "Degraded": "降级", "Delay Interval(s)": "检查间隔(秒)", "Delete": "删除", diff --git a/src/pages/network/containers/Network/actions/CreateNetwork.jsx b/src/pages/network/containers/Network/actions/CreateNetwork.jsx index 1d59c5bf..0b8993d6 100644 --- a/src/pages/network/containers/Network/actions/CreateNetwork.jsx +++ b/src/pages/network/containers/Network/actions/CreateNetwork.jsx @@ -21,6 +21,7 @@ import { isEmpty, isFunction } from 'lodash'; import Notify from 'components/Notify'; import { checkPolicyRule } from 'resources/policy'; import globalNeutronStore from 'stores/neutron/neutron'; +import { subnetIpv6Tip } from 'resources/network'; import networkUtil from './networkUtil'; const { @@ -68,6 +69,8 @@ export class CreateNetwork extends ModalAction { disable_gateway: false, more: false, port_security_enabled: true, + ipv6_ra_mode: 'slaac', + ipv6_address_mode: 'slaac', }; } @@ -418,6 +421,7 @@ export class CreateNetwork extends ModalAction { value: 'slaac', }, ], + tip: subnetIpv6Tip, hidden: ip_version !== 'ipv6', dependencies: ['ipv6_address_mode'], allowClear: true, @@ -454,6 +458,7 @@ export class CreateNetwork extends ModalAction { value: 'slaac', }, ], + tip: subnetIpv6Tip, hidden: ip_version !== 'ipv6', allowClear: true, }, diff --git a/src/pages/network/containers/Network/actions/CreateSubnet.jsx b/src/pages/network/containers/Network/actions/CreateSubnet.jsx index 70eda81e..abe77f1f 100644 --- a/src/pages/network/containers/Network/actions/CreateSubnet.jsx +++ b/src/pages/network/containers/Network/actions/CreateSubnet.jsx @@ -20,6 +20,7 @@ import { isEmpty } from 'lodash'; import { checkPolicyRule } from 'resources/policy'; import globalProjectStore from 'stores/keystone/project'; import globalRootStore from 'stores/root'; +import { subnetIpv6Tip } from 'resources/network'; import networkUtil from './networkUtil'; const { @@ -60,6 +61,8 @@ export default class CreateSubnet extends ModalAction { project_id: this.currentProjectId, disable_gateway: false, more: false, + ipv6_ra_mode: 'slaac', + ipv6_address_mode: 'slaac', }; } @@ -195,6 +198,7 @@ export default class CreateSubnet extends ModalAction { value: 'slaac', }, ], + tip: subnetIpv6Tip, hidden: ip_version !== 'ipv6', dependencies: ['ipv6_address_mode'], allowClear: true, @@ -231,6 +235,7 @@ export default class CreateSubnet extends ModalAction { value: 'slaac', }, ], + tip: subnetIpv6Tip, hidden: ip_version !== 'ipv6', allowClear: true, }, diff --git a/src/resources/network.jsx b/src/resources/network.jsx index 8e0ad9cf..d50d7c8b 100644 --- a/src/resources/network.jsx +++ b/src/resources/network.jsx @@ -144,3 +144,7 @@ function PopUpSubnet({ subnetIds }) { )) ); } + +export const subnetIpv6Tip = t( + 'Default is slaac, for details, see https://docs.openstack.org/neutron/latest/admin/config-ipv6.html' +);