From b2f0d3df2988dbe4442aed94e752a544d6f0fb7d Mon Sep 17 00:00:00 2001 From: dv Date: Tue, 7 Apr 2026 22:25:08 +0300 Subject: [PATCH] fix output --- frontend/src/pages/TaskDetail.tsx | 43 ++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/TaskDetail.tsx b/frontend/src/pages/TaskDetail.tsx index 6a110b5..13d7c9c 100644 --- a/frontend/src/pages/TaskDetail.tsx +++ b/frontend/src/pages/TaskDetail.tsx @@ -1,5 +1,5 @@ -import { ArrowLeftOutlined, CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons' -import { Breadcrumb, Card, Col, Descriptions, Row, Spin, Table, Tag, Typography } from 'antd' +import { ArrowLeftOutlined, CheckCircleOutlined, CloseCircleOutlined, ExpandAltOutlined } from '@ant-design/icons' +import { Breadcrumb, Card, Col, Descriptions, Modal, Row, Spin, Table, Tag, Typography } from 'antd' import dayjs from 'dayjs' import { useEffect, useRef, useState } from 'react' import { useNavigate, useParams } from 'react-router-dom' @@ -26,6 +26,7 @@ export function TaskDetailPage() { const [log, setLog] = useState([]) const [deviceResults, setDeviceResults] = useState>({}) const logEndRef = useRef(null) + const [stdoutModal, setStdoutModal] = useState(null) // Populate log from persisted events on load useEffect(() => { @@ -87,8 +88,19 @@ export function TaskDetailPage() { title: 'Вывод', dataIndex: 'stdout', key: 'stdout', - ellipsis: true, - render: (s: string | null) => s ? {s.slice(0, 120)} : '—', + render: (s: string | null) => s ? ( +
+ + {s.slice(0, 120)}{s.length > 120 ? '…' : ''} + + {s.length > 120 && ( + setStdoutModal(s)} + /> + )} +
+ ) : '—', }, ] @@ -179,6 +191,29 @@ export function TaskDetailPage() { )} + + setStdoutModal(null)} + footer={null} + title="Вывод" + width={800} + > +
+          {stdoutModal}
+        
+
) }