feat(audit): 增加审计日志与演示数据管理

This commit is contained in:
2026-05-30 00:10:26 +08:00
parent 4a831ee2c5
commit 5c9718ddb1
13 changed files with 333 additions and 0 deletions

13
apps/audit/views.py Normal file
View File

@@ -0,0 +1,13 @@
from django.shortcuts import get_object_or_404, render
from .models import AgentAuditLog
def log_list(request):
logs = AgentAuditLog.objects.all()
return render(request, "audit/log_list.html", {"logs": logs})
def log_detail(request, log_id: int):
audit_log = get_object_or_404(AgentAuditLog, pk=log_id)
return render(request, "audit/log_detail.html", {"log": audit_log})