fix: Add tip for ipv6 subnet

1. add tip for ipv6 subnet
2. set default value of ipv6_ra_mode & ipv6_address_mode

Change-Id: Ie2cfe736052892b52e508a81a7d5c8e0e2a3528b
This commit is contained in:
zhuyue 2021-12-15 16:46:29 +08:00 committed by zhu yue
parent 91d9c80d09
commit 6ea6e2c8d0
5 changed files with 16 additions and 0 deletions

View File

@ -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",

View File

@ -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": "删除",

View File

@ -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,
},

View File

@ -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,
},

View File

@ -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'
);