diff --git a/backend/app/service/fail2ban.go b/backend/app/service/fail2ban.go index d74172ccd..6f1fa6096 100644 --- a/backend/app/service/fail2ban.go +++ b/backend/app/service/fail2ban.go @@ -101,17 +101,20 @@ func (u *Fail2BanService) Operate(operation string) error { func (u *Fail2BanService) UpdateConf(req dto.Fail2BanUpdate) error { if req.Key == "banaction" { if req.Value == "firewallcmd-ipset" || req.Value == "ufw" { + itemName := "ufw" + if req.Value == "firewallcmd-ipset" { + itemName = "firewallcmd" + } client, err := firewall.NewFirewallClient() if err != nil { return err } + if client.Name() != itemName { + return buserr.WithName("ErrBanAction", itemName) + } status, _ := client.Status() if status != "running" { - service := "firewalld" - if req.Value == "ufw" { - service = "ufw" - } - return buserr.WithName("ErrBanAction", service) + return buserr.WithName("ErrBanAction", itemName) } } } diff --git a/backend/utils/toolbox/fail2ban.go b/backend/utils/toolbox/fail2ban.go index c77b9dd88..2c9cce169 100644 --- a/backend/utils/toolbox/fail2ban.go +++ b/backend/utils/toolbox/fail2ban.go @@ -97,7 +97,7 @@ func (f *Fail2ban) ListBanned() ([]string, error) { if err != nil { return lists, err } - itemList := strings.Split(stdout, "\n") + itemList := strings.Split(stdout, " ") for _, item := range itemList { if len(item) != 0 { lists = append(lists, item) diff --git a/frontend/src/components/app-status/index.vue b/frontend/src/components/app-status/index.vue index bfdaf1fa2..1e140b3db 100644 --- a/frontend/src/components/app-status/index.vue +++ b/frontend/src/components/app-status/index.vue @@ -67,7 +67,7 @@
{{ $t('app.checkInstalledWarn', [data.app]) }} - + {{ $t('database.goInstall') }}
diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index c3148a095..b2978033e 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -755,7 +755,6 @@ const message = { sockPath: 'Socket Path', sockPathHelper: 'Communication channel between Docker Daemon and the client', sockPathHelper1: 'Default Path: /var/run/docker-x.sock', - sockPathHelper2: 'CurrentPath: {0}', sockPathMsg: 'Saving the Socket Path setting may result in Docker service being unavailable. Do you want to continue?', sockPathErr: 'Please select or enter the correct Docker sock file path', @@ -953,7 +952,7 @@ const message = { fail2ban: { sshPort: 'Listen to SSH Port', sshPortHelper: 'Current Fail2ban listens to the SSH connection port of the host', - noFail2ban: 'Fail2ban service not detected, please refer to the official documentation for installation', + noFail2ban: 'Fail2ban service not detected, please refer to the official documentation for installation!', unActive: 'The Fail2ban service is not enabled at present, please enable it first!', operation: 'Perform [{0}] operation on Fail2ban service, continue?', fail2banChange: 'Fail2ban Configuration Modification', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index ff14eff16..e3fffd552 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -726,7 +726,6 @@ const message = { sockPath: 'Socket 路徑', sockPathHelper: 'Docker 守護進程(Docker Daemon)與客戶端之間的通信通道', sockPathHelper1: '默認路徑:/var/run/docker-x.sock', - sockPathHelper2: '當前路徑:{0}', sockPathMsg: '保存設定 Socket 路徑可能導致 Docker 服務不可用,是否繼續?', sockPathErr: '請選擇或輸入正確的 Docker sock 文件路徑', }, @@ -904,7 +903,7 @@ const message = { fail2ban: { sshPort: '監聽 SSH 端口', sshPortHelper: '當前 Fail2ban 監聽主機 SSH 連接端口', - noFail2ban: '未檢測到 Fail2ban 服務,請參考官方文檔進行安裝', + noFail2ban: '未檢測到 Fail2ban 服務,請參考官方文檔進行安裝!', unActive: '當前未開啟 Fail2ban 服務,請先開啟!', operation: '對 Fail2ban 服務進行 [{0}] 操作,是否繼續?', fail2banChange: 'Fail2ban 配置修改', @@ -1376,7 +1375,7 @@ const message = { update: '更新', versionSelect: '請選擇版本', operatorHelper: '將對選中應用進行 {0} 操作,是否繼續?', - checkInstalledWarn: '未檢測到 {0} ,請進入應用商店點擊安裝!', + checkInstalledWarn: '未檢測到 {0} ,請進入應用商店點擊安裝!', gotoInstalled: '去安裝', search: '搜索', limitHelper: '該應用已安裝,不支持重復安裝', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 6db4babc2..c95dcd10a 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -727,7 +727,6 @@ const message = { sockPath: 'Socket 路径', sockPathHelper: 'Docker 守护进程(Docker Daemon)与客户端之间的通信通道', sockPathHelper1: '默认路径:/var/run/docker.sock', - sockPathHelper2: '当前路径:{0}', sockPathMsg: '保存设置 Socket 路径可能导致 Docker 服务不可用,是否继续?', sockPathErr: '请选择或输入正确的 Docker sock 文件路径', }, @@ -905,7 +904,7 @@ const message = { fail2ban: { sshPort: '监听 SSH 端口', sshPortHelper: '当前 Fail2ban 监听主机 SSH 连接端口', - noFail2ban: '未检测到 Fail2ban 服务,请参考官方文档进行安装', + noFail2ban: '未检测到 Fail2ban 服务,请参考官方文档进行安装!', unActive: '当前未开启 Fail2ban 服务,请先开启!', operation: '对 Fail2ban 服务进行 [{0}] 操作,是否继续?', fail2banChange: 'Fail2ban 配置修改', @@ -1376,7 +1375,7 @@ const message = { update: '更新', versionSelect: '请选择版本', operatorHelper: '将对选中应用进行 {0} 操作,是否继续?', - checkInstalledWarn: '未检测到 {0} ,请进入应用商店点击安装!', + checkInstalledWarn: '未检测到 {0} ,请进入应用商店点击安装!', gotoInstalled: '去安装', search: '搜索', limitHelper: '该应用已安装,不支持重复安装', diff --git a/frontend/src/views/container/setting/ipv6/index.vue b/frontend/src/views/container/setting/ipv6/index.vue index 5acee50e3..f7939df30 100644 --- a/frontend/src/views/container/setting/ipv6/index.vue +++ b/frontend/src/views/container/setting/ipv6/index.vue @@ -75,7 +75,7 @@ const loading = ref(); const drawerVisible = ref(); const confirmDialogRef = ref(); const formRef = ref(); -const showMore = ref(false); +const showMore = ref(true); interface DialogProps { fixedCidrV6: string; diff --git a/frontend/src/views/container/setting/sock-path/index.vue b/frontend/src/views/container/setting/sock-path/index.vue index 5b2e3ad47..d8cd1dd89 100644 --- a/frontend/src/views/container/setting/sock-path/index.vue +++ b/frontend/src/views/container/setting/sock-path/index.vue @@ -22,9 +22,6 @@ {{ $t('container.sockPathHelper1') }} - - {{ $t('container.sockPathHelper2', [form.currentPath]) }} - diff --git a/frontend/src/views/database/mysql/index.vue b/frontend/src/views/database/mysql/index.vue index 604826a56..88bc48b8c 100644 --- a/frontend/src/views/database/mysql/index.vue +++ b/frontend/src/views/database/mysql/index.vue @@ -190,7 +190,7 @@
{{ $t('app.checkInstalledWarn', [$t('database.noMysql')]) }} - + {{ $t('database.goInstall') }}
diff --git a/frontend/src/views/host/firewall/ip/index.vue b/frontend/src/views/host/firewall/ip/index.vue index c71504b81..cf51f8503 100644 --- a/frontend/src/views/host/firewall/ip/index.vue +++ b/frontend/src/views/host/firewall/ip/index.vue @@ -109,14 +109,10 @@
{{ $t('firewall.notSupport') }} - + + {{ $t('firewall.quickJump') }} - +
diff --git a/frontend/src/views/host/firewall/port/index.vue b/frontend/src/views/host/firewall/port/index.vue index cfbfb3a85..401023d20 100644 --- a/frontend/src/views/host/firewall/port/index.vue +++ b/frontend/src/views/host/firewall/port/index.vue @@ -159,14 +159,10 @@
{{ $t('firewall.notSupport') }} - + + {{ $t('firewall.quickJump') }} - +
diff --git a/frontend/src/views/toolbox/fail2ban/index.vue b/frontend/src/views/toolbox/fail2ban/index.vue index dd6a8308e..222246cb1 100644 --- a/frontend/src/views/toolbox/fail2ban/index.vue +++ b/frontend/src/views/toolbox/fail2ban/index.vue @@ -152,16 +152,12 @@
{{ $t('toolbox.fail2ban.noFail2ban') }} - + + {{ $t('firewall.quickJump') }} - +
- +
diff --git a/frontend/src/views/toolbox/supervisor/status/index.vue b/frontend/src/views/toolbox/supervisor/status/index.vue index 50b7e348f..40542041a 100644 --- a/frontend/src/views/toolbox/supervisor/status/index.vue +++ b/frontend/src/views/toolbox/supervisor/status/index.vue @@ -43,7 +43,7 @@ {{ $t('tool.supervisor.notSupportCrl') }} {{ $t('tool.supervisor.initHelper') }} - + {{ $t('firewall.quickJump') }}