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>
|
||||||
<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">
|
<link rel="stylesheet" crossorigin href="/assets/index-D7ShJUt4.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -217,6 +217,7 @@ const AdminGenerationRecords: React.FC = () => {
|
|||||||
username: item.username,
|
username: item.username,
|
||||||
projectId: item.projectId,
|
projectId: item.projectId,
|
||||||
projectName: item.projectName,
|
projectName: item.projectName,
|
||||||
|
industry: item.industry,
|
||||||
originalPrompt: item.originalPrompt,
|
originalPrompt: item.originalPrompt,
|
||||||
optimizedPrompt: item.optimizedPrompt,
|
optimizedPrompt: item.optimizedPrompt,
|
||||||
duration: item.duration,
|
duration: item.duration,
|
||||||
@@ -390,6 +391,10 @@ const AdminGenerationRecords: React.FC = () => {
|
|||||||
title: '项目', dataIndex: 'projectName', width: 120, ellipsis: true,
|
title: '项目', dataIndex: 'projectName', width: 120, ellipsis: true,
|
||||||
render: (v: string) => <Typography.Text style={{ fontSize: 13 }}>{v || '-'}</Typography.Text>,
|
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,
|
title: '类型', dataIndex: 'genType', width: 90, ellipsis: true,
|
||||||
render: (v: string) => {
|
render: (v: string) => {
|
||||||
|
|||||||
@@ -319,6 +319,7 @@ export interface AdminGenerationRecord {
|
|||||||
username: string;
|
username: string;
|
||||||
projectId: string;
|
projectId: string;
|
||||||
projectName: string;
|
projectName: string;
|
||||||
|
industry?: string;
|
||||||
originalPrompt: string;
|
originalPrompt: string;
|
||||||
optimizedPrompt: string;
|
optimizedPrompt: string;
|
||||||
duration?: number;
|
duration?: number;
|
||||||
|
|||||||
@@ -1400,7 +1400,7 @@ async def admin_list_generation_records(
|
|||||||
):
|
):
|
||||||
"""List all generation records across all users, with optional filters."""
|
"""List all generation records across all users, with optional filters."""
|
||||||
query = (
|
query = (
|
||||||
select(GenerationRecord, User.username, Project.name)
|
select(GenerationRecord, User.username, Project.name, Project.industry)
|
||||||
.join(User, GenerationRecord.user_id == User.id)
|
.join(User, GenerationRecord.user_id == User.id)
|
||||||
.join(Project, GenerationRecord.project_id == Project.id)
|
.join(Project, GenerationRecord.project_id == Project.id)
|
||||||
.where(GenerationRecord.deleted_at.is_(None), Project.deleted_at.is_(None))
|
.where(GenerationRecord.deleted_at.is_(None), Project.deleted_at.is_(None))
|
||||||
@@ -1427,7 +1427,7 @@ async def admin_list_generation_records(
|
|||||||
rows = result.all()
|
rows = result.all()
|
||||||
|
|
||||||
items = []
|
items = []
|
||||||
for record, username, project_name in rows:
|
for record, username, project_name, industry in rows:
|
||||||
refs = None
|
refs = None
|
||||||
if record.media_references:
|
if record.media_references:
|
||||||
try:
|
try:
|
||||||
@@ -1440,6 +1440,7 @@ async def admin_list_generation_records(
|
|||||||
"username": username,
|
"username": username,
|
||||||
"project_id": record.project_id,
|
"project_id": record.project_id,
|
||||||
"project_name": project_name,
|
"project_name": project_name,
|
||||||
|
"industry": industry,
|
||||||
"original_prompt": record.original_prompt,
|
"original_prompt": record.original_prompt,
|
||||||
"optimized_prompt": record.optimized_prompt,
|
"optimized_prompt": record.optimized_prompt,
|
||||||
"duration": record.duration,
|
"duration": record.duration,
|
||||||
|
|||||||
Reference in New Issue
Block a user