From 5f60ea3f8122934a9e21a56a38008f5a6e824881 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Fri, 8 Dec 2023 18:16:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=AF=BC=E8=87=B4=E7=9A=84=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8=E6=8A=96=E5=8A=A8=E9=97=AE=E9=A2=98=20(#3236)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/device.go | 4 +++- .../src/views/container/compose/index.vue | 1 - .../src/views/container/container/index.vue | 1 - .../container/container/upgrade/index.vue | 2 +- frontend/src/views/container/image/index.vue | 21 +++++++++---------- .../src/views/container/network/index.vue | 1 - frontend/src/views/container/repo/index.vue | 1 - .../src/views/container/template/index.vue | 1 - frontend/src/views/container/volume/index.vue | 1 - frontend/src/views/cronjob/index.vue | 1 - frontend/src/views/database/mysql/index.vue | 8 +++++-- frontend/src/views/host/firewall/ip/index.vue | 1 - .../src/views/host/firewall/port/index.vue | 1 - frontend/src/views/host/ssh/log/log.vue | 1 - frontend/src/views/log/operation/index.vue | 1 - frontend/src/views/setting/snapshot/index.vue | 1 - 16 files changed, 20 insertions(+), 27 deletions(-) diff --git a/backend/app/service/device.go b/backend/app/service/device.go index 9f1442478..28da10c78 100644 --- a/backend/app/service/device.go +++ b/backend/app/service/device.go @@ -326,7 +326,9 @@ func updateDNS(list []string) error { } } for _, item := range list { - newFile += fmt.Sprintf("nameserver %s \n", item) + if len(item) != 0 { + newFile += fmt.Sprintf("nameserver %s \n", item) + } } file, err := os.OpenFile(defaultDNSPath, os.O_WRONLY|os.O_TRUNC, 0640) if err != nil { diff --git a/frontend/src/views/container/compose/index.vue b/frontend/src/views/container/compose/index.vue index d499517d1..492d53159 100644 --- a/frontend/src/views/container/compose/index.vue +++ b/frontend/src/views/container/compose/index.vue @@ -36,7 +36,6 @@