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 TCP": "All TCP",
|
||||||
"All UDP": "All UDP",
|
"All UDP": "All UDP",
|
||||||
"All data downloaded.": "All data downloaded.",
|
"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",
|
"Allocate IP": "Allocate IP",
|
||||||
"Allocation Pools": "Allocation Pools",
|
"Allocation Pools": "Allocation Pools",
|
||||||
"Allowed Address Pair": "Allowed Address Pair",
|
"Allowed Address Pair": "Allowed Address Pair",
|
||||||
|
@ -110,6 +110,7 @@
|
|||||||
"All TCP": "所有TCP协议",
|
"All TCP": "所有TCP协议",
|
||||||
"All UDP": "所有UDP协议",
|
"All UDP": "所有UDP协议",
|
||||||
"All data downloaded.": "所有数据已完成下载。",
|
"All data downloaded.": "所有数据已完成下载。",
|
||||||
|
"All network segments are indicated by \"*\", not \"0.0.0.0/0\"": "所有网络段用 “*” 表示,协议不支持 “0.0.0.0/0” 表示所有网段",
|
||||||
"Allocate IP": "申请IP",
|
"Allocate IP": "申请IP",
|
||||||
"Allocation Pools": "分配地址池",
|
"Allocation Pools": "分配地址池",
|
||||||
"Allowed Address Pair": "可用地址对",
|
"Allowed Address Pair": "可用地址对",
|
||||||
|
@ -63,16 +63,26 @@ export class Create extends ModalAction {
|
|||||||
return getOptions(shareAccessLevel);
|
return getOptions(shareAccessLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
get defaultValue() {
|
|
||||||
return { isPublic: true };
|
|
||||||
}
|
|
||||||
|
|
||||||
get typeTip() {
|
get typeTip() {
|
||||||
return t(
|
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."
|
"'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() {
|
get formItems() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
@ -95,6 +105,7 @@ export class Create extends ModalAction {
|
|||||||
label: t('Access To'),
|
label: t('Access To'),
|
||||||
type: 'input',
|
type: 'input',
|
||||||
required: true,
|
required: true,
|
||||||
|
extra: this.getAccessExtra(),
|
||||||
},
|
},
|
||||||
metadataFormItem,
|
metadataFormItem,
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user