Commit 300459c8 by CaIon

fix(TaskLogs): use correct video URL for modal preview

parent 62020d00
...@@ -371,19 +371,20 @@ export const getTaskLogsColumns = ({ ...@@ -371,19 +371,20 @@ export const getTaskLogsColumns = ({
const isSuccess = record.status === 'SUCCESS'; const isSuccess = record.status === 'SUCCESS';
const isUrl = typeof text === 'string' && /^https?:\/\//.test(text); const isUrl = typeof text === 'string' && /^https?:\/\//.test(text);
if (isSuccess && isVideoTask && isUrl) { if (isSuccess && isVideoTask && isUrl) {
const videoUrl = `/v1/videos/${record.task_id}/content`; if (isSuccess && isVideoTask && isUrl) {
return ( return (
<a <a
href='#' href='#'
onClick={(e) => { onClick={(e) => {
e.preventDefault(); e.preventDefault();
openVideoModal(videoUrl); openVideoModal(text);
}} }}
> >
{t('点击预览视频')} {t('点击预览视频')}
</a> </a>
); );
} }
}
if (!text) { if (!text) {
return t('无'); return t('无');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment