feat: 管理首页新增会话存储后端状态展示
- 仪表盘新增「会话存储后端」卡片,显示 Redis/内存 模式 - 降级时显示「已降级」标签 + 降级说明 - 内存模式下显示活跃会话数 - 新增 stat-red / stat-desc / stat-badge / badge-warn CSS 样式
This commit is contained in:
@ -29,9 +29,15 @@ func (ac *AdminController) Dashboard(c *gin.Context) {
|
||||
if err != nil {
|
||||
totalUsers = 0
|
||||
}
|
||||
storeMetrics := ac.adminService.GetStoreMetrics()
|
||||
c.HTML(http.StatusOK, "admin/dashboard/index.html", common.BuildAdminPageData(c, gin.H{
|
||||
"Title": "管理首页",
|
||||
"TotalUsers": totalUsers,
|
||||
"Title": "管理首页",
|
||||
"TotalUsers": totalUsers,
|
||||
"StoreType": storeMetrics.Type,
|
||||
"StoreHealthy": storeMetrics.Healthy,
|
||||
"StoreDegraded": storeMetrics.Degraded,
|
||||
"DegradedNote": storeMetrics.DegradedNote,
|
||||
"ActiveSessions": storeMetrics.ActiveCount,
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user