From bb93cb076e37d5bc0bd157e5136652351adc6954 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Mon, 6 Nov 2023 21:27:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=20UFW=20=E9=98=B2?= =?UTF-8?q?=E7=81=AB=E5=A2=99=E5=90=AF=E7=94=A8=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#2823)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs #2811 --- backend/app/service/firewall.go | 6 ++++-- frontend/src/views/cronjob/index.vue | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/app/service/firewall.go b/backend/app/service/firewall.go index e3c0ef986..28541f418 100644 --- a/backend/app/service/firewall.go +++ b/backend/app/service/firewall.go @@ -538,8 +538,10 @@ func (u *FirewallService) addPortsBeforeStart(client firewall.FirewallClient) er } apps := u.loadPortByApp() for _, app := range apps { - if err := client.Port(fireClient.FireInfo{Port: app.HttpPort, Protocol: "tcp", Strategy: "accept"}, "add"); err != nil { - return err + if len(app.HttpPort) != 0 && app.HttpPort != "0" { + if err := client.Port(fireClient.FireInfo{Port: app.HttpPort, Protocol: "tcp", Strategy: "accept"}, "add"); err != nil { + return err + } } } diff --git a/frontend/src/views/cronjob/index.vue b/frontend/src/views/cronjob/index.vue index cd62a0287..f2d7b622b 100644 --- a/frontend/src/views/cronjob/index.vue +++ b/frontend/src/views/cronjob/index.vue @@ -258,7 +258,6 @@ const onDelete = async (row: Cronjob.CronjobInfo | null) => { if (hasBackup(row.type)) { showClean.value = true; } - return; } else { for (const item of selects.value) { names.push(item.name);