Skip to content

Commit b808b96

Browse files
committed
fix(TaskLogs): use correct video URL for modal preview
1 parent 23a6813 commit b808b96

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

web/src/components/table/task-logs/TaskLogsColumnDefs.jsx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -371,18 +371,19 @@ export const getTaskLogsColumns = ({
371371
const isSuccess = record.status === 'SUCCESS';
372372
const isUrl = typeof text === 'string' && /^https?:\/\//.test(text);
373373
if (isSuccess && isVideoTask && isUrl) {
374-
const videoUrl = `/v1/videos/${record.task_id}/content`;
375-
return (
376-
<a
377-
href='#'
378-
onClick={(e) => {
379-
e.preventDefault();
380-
openVideoModal(videoUrl);
381-
}}
382-
>
383-
{t('点击预览视频')}
384-
</a>
385-
);
374+
if (isSuccess && isVideoTask && isUrl) {
375+
return (
376+
<a
377+
href='#'
378+
onClick={(e) => {
379+
e.preventDefault();
380+
openVideoModal(text);
381+
}}
382+
>
383+
{t('点击预览视频')}
384+
</a>
385+
);
386+
}
386387
}
387388
if (!text) {
388389
return t('无');

0 commit comments

Comments
 (0)