1
This commit is contained in:
+548
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -28,7 +28,7 @@
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script type="module" crossorigin src="/assets/index-3RDqkBKt.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-CbFNd7rH.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-D7ShJUt4.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -217,6 +217,7 @@ const AdminGenerationRecords: React.FC = () => {
|
||||
username: item.username,
|
||||
projectId: item.projectId,
|
||||
projectName: item.projectName,
|
||||
industry: item.industry,
|
||||
originalPrompt: item.originalPrompt,
|
||||
optimizedPrompt: item.optimizedPrompt,
|
||||
duration: item.duration,
|
||||
@@ -390,6 +391,10 @@ const AdminGenerationRecords: React.FC = () => {
|
||||
title: '项目', dataIndex: 'projectName', width: 120, ellipsis: true,
|
||||
render: (v: string) => <Typography.Text style={{ fontSize: 13 }}>{v || '-'}</Typography.Text>,
|
||||
},
|
||||
{
|
||||
title: '行业', dataIndex: 'industry', width: 100, ellipsis: true,
|
||||
render: (v: string) => <Tag color="cyan">{v || '-'}</Tag>,
|
||||
},
|
||||
{
|
||||
title: '类型', dataIndex: 'genType', width: 90, ellipsis: true,
|
||||
render: (v: string) => {
|
||||
|
||||
@@ -319,6 +319,7 @@ export interface AdminGenerationRecord {
|
||||
username: string;
|
||||
projectId: string;
|
||||
projectName: string;
|
||||
industry?: string;
|
||||
originalPrompt: string;
|
||||
optimizedPrompt: string;
|
||||
duration?: number;
|
||||
|
||||
@@ -1400,7 +1400,7 @@ async def admin_list_generation_records(
|
||||
):
|
||||
"""List all generation records across all users, with optional filters."""
|
||||
query = (
|
||||
select(GenerationRecord, User.username, Project.name)
|
||||
select(GenerationRecord, User.username, Project.name, Project.industry)
|
||||
.join(User, GenerationRecord.user_id == User.id)
|
||||
.join(Project, GenerationRecord.project_id == Project.id)
|
||||
.where(GenerationRecord.deleted_at.is_(None), Project.deleted_at.is_(None))
|
||||
@@ -1427,7 +1427,7 @@ async def admin_list_generation_records(
|
||||
rows = result.all()
|
||||
|
||||
items = []
|
||||
for record, username, project_name in rows:
|
||||
for record, username, project_name, industry in rows:
|
||||
refs = None
|
||||
if record.media_references:
|
||||
try:
|
||||
@@ -1440,6 +1440,7 @@ async def admin_list_generation_records(
|
||||
"username": username,
|
||||
"project_id": record.project_id,
|
||||
"project_name": project_name,
|
||||
"industry": industry,
|
||||
"original_prompt": record.original_prompt,
|
||||
"optimized_prompt": record.optimized_prompt,
|
||||
"duration": record.duration,
|
||||
|
||||
Reference in New Issue
Block a user