mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-08 22:46:51 +08:00
fix: 防火墙 ip 规则取消范围输入 (#598)
This commit is contained in:
parent
b2e38c320d
commit
6ff9c4335f
3 changed files with 1 additions and 6 deletions
|
@ -1280,7 +1280,6 @@ const message = {
|
||||||
addressFormatError: 'Please enter a valid ip address!',
|
addressFormatError: 'Please enter a valid ip address!',
|
||||||
addressHelper1: 'Multiple IP please separated with ",", such as 172.16.10.11, 172.16.10.99',
|
addressHelper1: 'Multiple IP please separated with ",", such as 172.16.10.11, 172.16.10.99',
|
||||||
addressHelper2: 'IP segment, such as 172.16.10.0/24',
|
addressHelper2: 'IP segment, such as 172.16.10.0/24',
|
||||||
addressHelper3: 'IP address range, such as 172.16.10.11-172.16.10.99',
|
|
||||||
allIP: 'All IP',
|
allIP: 'All IP',
|
||||||
portRule: 'Port rule',
|
portRule: 'Port rule',
|
||||||
ipRule: 'IP rule',
|
ipRule: 'IP rule',
|
||||||
|
|
|
@ -1264,7 +1264,6 @@ const message = {
|
||||||
addressFormatError: '请输入合法的 ip 地址!',
|
addressFormatError: '请输入合法的 ip 地址!',
|
||||||
addressHelper1: '多个 IP 请用 "," 隔开:172.16.10.11,172.16.10.99',
|
addressHelper1: '多个 IP 请用 "," 隔开:172.16.10.11,172.16.10.99',
|
||||||
addressHelper2: 'IP 段:172.16.0.0/24',
|
addressHelper2: 'IP 段:172.16.0.0/24',
|
||||||
addressHelper3: 'IP 范围:172.16.10.10-172.16.10.19(暂不支持跨网段范围)',
|
|
||||||
allIP: '所有 IP',
|
allIP: '所有 IP',
|
||||||
portRule: '端口规则',
|
portRule: '端口规则',
|
||||||
ipRule: 'IP 规则',
|
ipRule: 'IP 规则',
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
/>
|
/>
|
||||||
<span class="input-help">{{ $t('firewall.addressHelper1') }}</span>
|
<span class="input-help">{{ $t('firewall.addressHelper1') }}</span>
|
||||||
<span class="input-help">{{ $t('firewall.addressHelper2') }}</span>
|
<span class="input-help">{{ $t('firewall.addressHelper2') }}</span>
|
||||||
<span class="input-help">{{ $t('firewall.addressHelper3') }}</span>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('firewall.strategy')" prop="strategy">
|
<el-form-item :label="$t('firewall.strategy')" prop="strategy">
|
||||||
<el-radio-group v-model="dialogData.rowData!.strategy">
|
<el-radio-group v-model="dialogData.rowData!.strategy">
|
||||||
|
@ -92,9 +91,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
||||||
dialogData.value.rowData.operation = 'add';
|
dialogData.value.rowData.operation = 'add';
|
||||||
if (!dialogData.value.rowData) return;
|
if (!dialogData.value.rowData) return;
|
||||||
let ips = [];
|
let ips = [];
|
||||||
if (dialogData.value.rowData.address.indexOf('-') !== -1) {
|
if (dialogData.value.rowData.address.indexOf(',') !== -1) {
|
||||||
ips = dialogData.value.rowData.address.split('-');
|
|
||||||
} else if (dialogData.value.rowData.address.indexOf(',') !== -1) {
|
|
||||||
ips = dialogData.value.rowData.address.split(',');
|
ips = dialogData.value.rowData.address.split(',');
|
||||||
} else if (dialogData.value.rowData.address.indexOf('/') !== -1) {
|
} else if (dialogData.value.rowData.address.indexOf('/') !== -1) {
|
||||||
ips.push(dialogData.value.rowData.address.split('/')[0]);
|
ips.push(dialogData.value.rowData.address.split('/')[0]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue