fix: add ip tip for NFS/CIFS share create access rule
1. Add ip tip for NFS/CIFS share create access rule 2. Fix default value when create access rule Change-Id: I4728aa414d19cf0afdae1fa6e887b876beb76255
This commit is contained in:
parent
15d5998e11
commit
09fb7742a1
@ -110,6 +110,7 @@
|
||||
"All TCP": "All TCP",
|
||||
"All UDP": "All UDP",
|
||||
"All data downloaded.": "All data downloaded.",
|
||||
"All network segments are indicated by \"*\", not \"0.0.0.0/0\"": "All network segments are indicated by \"*\", not \"0.0.0.0/0\"",
|
||||
"Allocate IP": "Allocate IP",
|
||||
"Allocation Pools": "Allocation Pools",
|
||||
"Allowed Address Pair": "Allowed Address Pair",
|
||||
|
@ -110,6 +110,7 @@
|
||||
"All TCP": "所有TCP协议",
|
||||
"All UDP": "所有UDP协议",
|
||||
"All data downloaded.": "所有数据已完成下载。",
|
||||
"All network segments are indicated by \"*\", not \"0.0.0.0/0\"": "所有网络段用 “*” 表示,协议不支持 “0.0.0.0/0” 表示所有网段",
|
||||
"Allocate IP": "申请IP",
|
||||
"Allocation Pools": "分配地址池",
|
||||
"Allowed Address Pair": "可用地址对",
|
||||
|
@ -63,16 +63,26 @@ export class Create extends ModalAction {
|
||||
return getOptions(shareAccessLevel);
|
||||
}
|
||||
|
||||
get defaultValue() {
|
||||
return { isPublic: true };
|
||||
}
|
||||
|
||||
get typeTip() {
|
||||
return t(
|
||||
"'ip' rule represents IPv4 or IPv6 address, 'cert' rule represents TLS certificate, 'user' rule represents username or usergroup, 'cephx' rule represents ceph auth ID."
|
||||
);
|
||||
}
|
||||
|
||||
get nameForStateUpdate() {
|
||||
return ['access_type'];
|
||||
}
|
||||
|
||||
getAccessExtra() {
|
||||
const { access_type: type } = this.state;
|
||||
const { detail: { share_proto: proto } = {} } = this.containerProps || {};
|
||||
const ipTipTypes = ['NFS', 'CIFS'];
|
||||
if (ipTipTypes.includes(proto) && type === 'ip') {
|
||||
return t('All network segments are indicated by "*", not "0.0.0.0/0"');
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
get formItems() {
|
||||
return [
|
||||
{
|
||||
@ -95,6 +105,7 @@ export class Create extends ModalAction {
|
||||
label: t('Access To'),
|
||||
type: 'input',
|
||||
required: true,
|
||||
extra: this.getAccessExtra(),
|
||||
},
|
||||
metadataFormItem,
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user