From 6ff9c4335f0f3d450739b10cccaa0c4a2a16b0e8 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Wed, 12 Apr 2023 16:32:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=98=B2=E7=81=AB=E5=A2=99=20ip=20?= =?UTF-8?q?=E8=A7=84=E5=88=99=E5=8F=96=E6=B6=88=E8=8C=83=E5=9B=B4=E8=BE=93?= =?UTF-8?q?=E5=85=A5=20(#598)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/modules/en.ts | 1 - frontend/src/lang/modules/zh.ts | 1 - frontend/src/views/host/firewall/ip/operate/index.vue | 5 +---- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 8164a33a9..c84575564 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1280,7 +1280,6 @@ const message = { addressFormatError: 'Please enter a valid ip address!', 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', - addressHelper3: 'IP address range, such as 172.16.10.11-172.16.10.99', allIP: 'All IP', portRule: 'Port rule', ipRule: 'IP rule', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index c5e388710..ef70ded4d 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1264,7 +1264,6 @@ const message = { addressFormatError: '请输入合法的 ip 地址!', addressHelper1: '多个 IP 请用 "," 隔开:172.16.10.11,172.16.10.99', addressHelper2: 'IP 段:172.16.0.0/24', - addressHelper3: 'IP 范围:172.16.10.10-172.16.10.19(暂不支持跨网段范围)', allIP: '所有 IP', portRule: '端口规则', ipRule: 'IP 规则', diff --git a/frontend/src/views/host/firewall/ip/operate/index.vue b/frontend/src/views/host/firewall/ip/operate/index.vue index 91b27dbfd..9937b092b 100644 --- a/frontend/src/views/host/firewall/ip/operate/index.vue +++ b/frontend/src/views/host/firewall/ip/operate/index.vue @@ -17,7 +17,6 @@ /> {{ $t('firewall.addressHelper1') }} {{ $t('firewall.addressHelper2') }} - {{ $t('firewall.addressHelper3') }} @@ -92,9 +91,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => { dialogData.value.rowData.operation = 'add'; if (!dialogData.value.rowData) return; let ips = []; - if (dialogData.value.rowData.address.indexOf('-') !== -1) { - ips = dialogData.value.rowData.address.split('-'); - } else 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.push(dialogData.value.rowData.address.split('/')[0]);