From 86ee88a20c266c080f736ba23647853c4d7e4dfb Mon Sep 17 00:00:00 2001 From: lanrenwo Date: Wed, 26 Oct 2022 09:33:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E8=AE=A1=E6=97=A5=E5=BF=97=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=A1=B5=E6=98=BE=E7=A4=BA=E5=AE=A1=E8=AE=A1=E5=8E=BB?= =?UTF-8?q?=E9=87=8D=E9=97=B4=E9=9A=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/admin/api_other.go | 2 ++ server/dbdata/setting.go | 5 +++-- web/src/pages/set/Other.vue | 6 +++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/server/admin/api_other.go b/server/admin/api_other.go index 557b27a..d9d24d8 100644 --- a/server/admin/api_other.go +++ b/server/admin/api_other.go @@ -7,6 +7,7 @@ import ( "net/http" "regexp" + "github.com/bjdgyc/anylink/base" "github.com/bjdgyc/anylink/dbdata" ) @@ -82,6 +83,7 @@ func SetOtherAuditLog(w http.ResponseWriter, r *http.Request) { RespError(w, RespInternalErr, err) return } + data.AuditInterval = base.Cfg.AuditInterval RespSucess(w, data) } diff --git a/server/dbdata/setting.go b/server/dbdata/setting.go index 964cb72..970822a 100644 --- a/server/dbdata/setting.go +++ b/server/dbdata/setting.go @@ -21,8 +21,9 @@ type SettingSmtp struct { } type SettingAuditLog struct { - LifeDay int `json:"life_day"` - ClearTime string `json:"clear_time"` + AuditInterval int `json:"audit_interval"` + LifeDay int `json:"life_day"` + ClearTime string `json:"clear_time"` } type SettingOther struct { diff --git a/web/src/pages/set/Other.vue b/web/src/pages/set/Other.vue index 43f96fa..98fd074 100644 --- a/web/src/pages/set/Other.vue +++ b/web/src/pages/set/Other.vue @@ -34,6 +34,10 @@ + + 秒 +

如需开启审计日志功能,请修改配置文件中的 audit_interval 参数并重启服务, -1 代表关闭

+

范围: 0 ~ 365天 , 0 代表永久保存

@@ -253,7 +257,7 @@ export default {