diff --git a/src/admin/Bootstrap.Admin/Controllers/Api/SettingsController.cs b/src/admin/Bootstrap.Admin/Controllers/Api/SettingsController.cs
index 9733fdd6..4df34cd8 100644
--- a/src/admin/Bootstrap.Admin/Controllers/Api/SettingsController.cs
+++ b/src/admin/Bootstrap.Admin/Controllers/Api/SettingsController.cs
@@ -22,7 +22,7 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[HttpPost]
- [ButtonAuthorize(Url = "~/Admin/Settings", Auth = "saveTitle,saveFooter,saveTheme,saveUISettings,loginSettings,lockScreen,defaultApp,blazor,iplocate")]
+ [ButtonAuthorize(Url = "~/Admin/Settings", Auth = "saveTitle,saveFooter,saveTheme,saveUISettings,loginSettings,lockScreen,defaultApp,blazor,iplocate,logSettings")]
public bool Post([FromBody]IEnumerable values) => DictHelper.SaveUISettings(values);
///
diff --git a/src/admin/Bootstrap.Admin/Models/SettingsModel.cs b/src/admin/Bootstrap.Admin/Models/SettingsModel.cs
index 3e5d9327..005c9e9f 100644
--- a/src/admin/Bootstrap.Admin/Models/SettingsModel.cs
+++ b/src/admin/Bootstrap.Admin/Models/SettingsModel.cs
@@ -21,6 +21,12 @@ namespace Bootstrap.Admin.Models
DefaultApp = DictHelper.RetrieveDefaultApp();
IPLocators = DictHelper.RetireveLocators();
IPLocatorSvr = DictHelper.RetrieveLocaleIPSvr();
+ ErrorLogPeriod = DictHelper.RetrieveExceptionsLogPeriod();
+ OpLog = DictHelper.RetrieveLogsPeriod();
+ LogLog = DictHelper.RetrieveLoginLogsPeriod();
+ TraceLog = DictHelper.RetrieveAccessLogPeriod();
+ CookiePeriod = DictHelper.RetrieveCookieExpiresPeriod();
+ IPCachePeriod = DictHelper.RetrieveLocaleIPSvrCachePeriod();
}
///
@@ -31,13 +37,11 @@ namespace Bootstrap.Admin.Models
///
/// 获得 地理位置信息集合
///
- ///
public IEnumerable IPLocators { get; }
///
/// 获得 数据库中配置的地理位置信息接口
///
- ///
public string IPLocatorSvr { get; }
///
@@ -49,5 +53,35 @@ namespace Bootstrap.Admin.Models
/// 获得 是否开启自动锁屏
///
public bool DefaultApp { get; }
+
+ ///
+ /// 程序异常日志保留时长
+ ///
+ public int ErrorLogPeriod { get; }
+
+ ///
+ /// 操作日志保留时长
+ ///
+ public int OpLog { get; }
+
+ ///
+ /// 登录日志保留时长
+ ///
+ public int LogLog { get; }
+
+ ///
+ /// 访问日志保留时长
+ ///
+ public int TraceLog { get; }
+
+ ///
+ /// Cookie保留时长
+ ///
+ public int CookiePeriod { get; }
+
+ ///
+ /// IP请求缓存时长
+ ///
+ public int IPCachePeriod { get; }
}
}
diff --git a/src/admin/Bootstrap.Admin/Views/Admin/Settings.cshtml b/src/admin/Bootstrap.Admin/Views/Admin/Settings.cshtml
index 40f261b5..2724e6fc 100644
--- a/src/admin/Bootstrap.Admin/Views/Admin/Settings.cshtml
+++ b/src/admin/Bootstrap.Admin/Views/Admin/Settings.cshtml
@@ -202,6 +202,45 @@
+
+
+
+
+ 演示系统禁止更改日志缓存设置
+
+
+
+
+