在前端穿搭图片生成记录页面显示 ComfyUI 任务ID

- 在 OutfitPhotoGenerationHistory 组件的记录列表中显示 comfyui_prompt_id
- 在详情模态框中添加 ComfyUI 任务ID 字段显示
- 在 OutfitImageGallery 组件的网格视图和列表视图中显示任务ID
- 使用 font-mono 和背景色突出显示任务ID,便于识别和调试
- 为批量任务进度更新问题的调试提供可视化支持
This commit is contained in:
imeepos 2025-07-31 15:45:25 +08:00
parent 833cb0d987
commit 72fbdbbd66
2 changed files with 26 additions and 1 deletions

View File

@ -462,13 +462,20 @@ export const OutfitImageGallery: React.FC<OutfitImageGalleryProps> = ({
{/* 统计信息 */} {/* 统计信息 */}
<div className="mt-4 pt-4 border-t border-gray-100"> <div className="mt-4 pt-4 border-t border-gray-100">
<div className="flex items-center justify-between text-xs text-gray-500"> <div className="flex items-center justify-between text-xs text-gray-500 mb-2">
<span>: {record.product_images.length}</span> <span>: {record.product_images.length}</span>
<span>: {record.outfit_images.length}</span> <span>: {record.outfit_images.length}</span>
{record.duration_ms && ( {record.duration_ms && (
<span>: {formatDuration(record.duration_ms)}</span> <span>: {formatDuration(record.duration_ms)}</span>
)} )}
</div> </div>
{record.comfyui_prompt_id && (
<div className="text-xs text-gray-500">
<span className="font-mono bg-gray-100 px-2 py-1 rounded">
ID: {record.comfyui_prompt_id}
</span>
</div>
)}
</div> </div>
</div> </div>
</div> </div>
@ -509,6 +516,11 @@ export const OutfitImageGallery: React.FC<OutfitImageGalleryProps> = ({
{record.status === OutfitImageStatus.Processing && ( {record.status === OutfitImageStatus.Processing && (
<span>: {Math.round(record.progress * 100)}%</span> <span>: {Math.round(record.progress * 100)}%</span>
)} )}
{record.comfyui_prompt_id && (
<span className="font-mono bg-gray-100 px-2 py-1 rounded">
ID: {record.comfyui_prompt_id}
</span>
)}
</div> </div>
</div> </div>

View File

@ -290,6 +290,11 @@ export const OutfitPhotoGenerationHistory: React.FC<OutfitPhotoGenerationHistory
{record.product_image_path && ( {record.product_image_path && (
<span>: {record.product_image_path.split('/').pop()}</span> <span>: {record.product_image_path.split('/').pop()}</span>
)} )}
{record.comfyui_prompt_id && (
<span className="font-mono bg-gray-100 px-2 py-1 rounded">
ID: {record.comfyui_prompt_id}
</span>
)}
</div> </div>
</div> </div>
@ -374,6 +379,14 @@ export const OutfitPhotoGenerationHistory: React.FC<OutfitPhotoGenerationHistory
<span className="ml-2 text-gray-600">{formatDuration(selectedRecord.generation_time_ms)}</span> <span className="ml-2 text-gray-600">{formatDuration(selectedRecord.generation_time_ms)}</span>
</div> </div>
)} )}
{selectedRecord.comfyui_prompt_id && (
<div className="col-span-2">
<span className="font-medium text-gray-700">ComfyUI ID:</span>
<span className="ml-2 text-gray-600 font-mono bg-gray-100 px-2 py-1 rounded text-xs">
{selectedRecord.comfyui_prompt_id}
</span>
</div>
)}
</div> </div>
<div> <div>