feat: ServerManager 死按钮清理+CSV导出+统计卡片提取; 审批/导航后端拆分; DialogDescription修复; AppRelease重试按钮实现
This commit is contained in:
1 parent
f5bda8b03b
commit
be529c8c36
14 files changed
+615
-576
No files matched your search
@@ -144,7 +144,7 @@ func (h *AuditHandler) GetAuditModules(c *gin.Context) {
|
||||
{"value": "domain", "label": "域名管理"},
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{"data": modules})
|
||||
c.JSON(http.StatusOK, models.Response{Code: 200, Data: modules}) // Logan.Li
|
||||
}
|
||||
|
||||
// GetAuditActions 获取审计操作类型列表
|
||||
@@ -170,7 +170,7 @@ func (h *AuditHandler) GetAuditActions(c *gin.Context) {
|
||||
{"value": "export", "label": "导出"},
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{"data": actions})
|
||||
c.JSON(http.StatusOK, models.Response{Code: 200, Data: actions}) // Logan.Li
|
||||
}
|
||||
|
||||
// ExportAuditLogs 导出审计日志
|
||||
@@ -222,11 +222,10 @@ func (h *AuditHandler) ExportAuditLogs(c *gin.Context) {
|
||||
|
||||
// TODO: 实现CSV/Excel导出功能
|
||||
// 这里返回JSON格式的数据,实际项目中应该生成CSV或Excel文件
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "导出成功",
|
||||
"count": len(logs),
|
||||
"data": logs,
|
||||
})
|
||||
c.JSON(http.StatusOK, models.Response{Code: 200, Message: "导出成功", Data: gin.H{
|
||||
"count": len(logs),
|
||||
"logs": logs,
|
||||
}}) // Logan.Li
|
||||
}
|
||||
|
||||
// GetAuditStatistics 获取审计统计
|
||||
@@ -291,13 +290,13 @@ func (h *AuditHandler) GetAuditStatistics(c *gin.Context) {
|
||||
Where("DATE(created_at) = ?", today).
|
||||
Count(&todayCount)
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"total_count": totalCount,
|
||||
"today_count": todayCount,
|
||||
"module_stats": moduleStats,
|
||||
"action_stats": actionStats,
|
||||
"daily_stats": dailyStats,
|
||||
})
|
||||
c.JSON(http.StatusOK, models.Response{Code: 200, Data: gin.H{
|
||||
"total_count": totalCount,
|
||||
"today_count": todayCount,
|
||||
"module_stats": moduleStats,
|
||||
"action_stats": actionStats,
|
||||
"daily_stats": dailyStats,
|
||||
}}) // Logan.Li
|
||||
}
|
||||
|
||||
// ClearAuditLogs 清理审计日志
|
||||
@@ -341,10 +340,9 @@ func (h *AuditHandler) ClearAuditLogs(c *gin.Context) {
|
||||
"deleted": result.RowsAffected,
|
||||
})
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "清理成功",
|
||||
"deleted": result.RowsAffected,
|
||||
})
|
||||
c.JSON(http.StatusOK, models.Response{Code: 200, Message: "清理成功", Data: gin.H{
|
||||
"deleted": result.RowsAffected,
|
||||
}}) // Logan.Li
|
||||
}
|
||||
|
||||
// RecordAuditLog 记录审计日志
|
||||
|
||||
Reference in new issue
Block a user