diff --git a/web/app/components/app/workflow-log/detail.tsx b/web/app/components/app/workflow-log/detail.tsx index 20daa8dc44..dc5127b6e7 100644 --- a/web/app/components/app/workflow-log/detail.tsx +++ b/web/app/components/app/workflow-log/detail.tsx @@ -15,9 +15,9 @@ const DetailPanel: FC = ({ runID, onClose }) => { return (
- + -

{t('appLog.runDetail.workflowTitle')}

+

{t('appLog.runDetail.workflowTitle')}

) diff --git a/web/app/components/base/chat/chat/answer/workflow-process.tsx b/web/app/components/base/chat/chat/answer/workflow-process.tsx index 5f36e40c40..99fe99c5e8 100644 --- a/web/app/components/base/chat/chat/answer/workflow-process.tsx +++ b/web/app/components/base/chat/chat/answer/workflow-process.tsx @@ -67,9 +67,9 @@ const WorkflowProcessItem = ({ return (
{ running && ( - + ) } { succeeded && ( - + ) } { failed && ( - + ) } -
+
{t('workflow.common.workflowProcess')}
- +
{ !collapse && ( diff --git a/web/app/components/base/message-log-modal/index.tsx b/web/app/components/base/message-log-modal/index.tsx index 45130b126f..0807450776 100644 --- a/web/app/components/base/message-log-modal/index.tsx +++ b/web/app/components/base/message-log-modal/index.tsx @@ -1,13 +1,11 @@ import type { FC } from 'react' import { useTranslation } from 'react-i18next' -import { useCallback, useEffect, useRef, useState } from 'react' -import { useBoolean, useClickAway } from 'ahooks' +import { useEffect, useRef, useState } from 'react' +import { useClickAway } from 'ahooks' import { RiCloseLine } from '@remixicon/react' -import IterationResultPanel from '../../workflow/run/iteration-result-panel' import cn from '@/utils/classnames' import type { IChatItem } from '@/app/components/base/chat/chat/type' import Run from '@/app/components/workflow/run' -import type { NodeTracing } from '@/types/workflow' type MessageLogModalProps = { currentLogItem?: IChatItem @@ -36,23 +34,12 @@ const MessageLogModal: FC = ({ setMounted(true) }, []) - const [iterationRunResult, setIterationRunResult] = useState([]) - const [isShowIterationDetail, { - setTrue: doShowIterationDetail, - setFalse: doHideIterationDetail, - }] = useBoolean(false) - - const handleShowIterationDetail = useCallback((detail: NodeTracing[][]) => { - setIterationRunResult(detail) - doShowIterationDetail() - }, [doShowIterationDetail]) - if (!currentLogItem || !currentLogItem.workflow_run_id) return null return (
= ({ }} ref={ref} > - {isShowIterationDetail - ? ( - - ) - : ( - <> -

{t('appLog.runDetail.title')}

- - - - - - )} - +

{t('appLog.runDetail.title')}

+ + + +
) } diff --git a/web/app/components/workflow/panel/record.tsx b/web/app/components/workflow/panel/record.tsx index 079dd2cc86..eefdd2d638 100644 --- a/web/app/components/workflow/panel/record.tsx +++ b/web/app/components/workflow/panel/record.tsx @@ -18,8 +18,8 @@ const Record = () => { }, [handleUpdateWorkflowCanvas]) return ( -
-
+
+
{`Test Run#${historyWorkflowData?.sequence_number}`}
void - onShowIterationDetail: (detail: NodeTracing[][]) => void } -const RunPanel: FC = ({ hideResult, activeTab = 'RESULT', runID, getResultCallback, onShowIterationDetail }) => { +const RunPanel: FC = ({ hideResult, activeTab = 'RESULT', runID, getResultCallback }) => { const { t } = useTranslation() const { notify } = useContext(ToastContext) const [currentTab, setCurrentTab] = useState(activeTab) @@ -197,35 +196,35 @@ const RunPanel: FC = ({ hideResult, activeTab = 'RESULT', runID, getRe return (
{/* tab */} -
+
{!hideResult && (
switchTab('RESULT')} >{t('runLog.result')}
)}
switchTab('DETAIL')} >{t('runLog.detail')}
switchTab('TRACING')} >{t('runLog.tracing')}
{/* panel detal */} -
+
{loading && ( -
+
)} diff --git a/web/app/components/workflow/run/iteration-result-panel.tsx b/web/app/components/workflow/run/iteration-result-panel.tsx index c833ea0342..229871b755 100644 --- a/web/app/components/workflow/run/iteration-result-panel.tsx +++ b/web/app/components/workflow/run/iteration-result-panel.tsx @@ -28,24 +28,24 @@ const IterationResultPanel: FC = ({ <>
-
+
{t(`${i18nPrefix}.testRunIteration`)}
- +
-
+
-
{t(`${i18nPrefix}.back`)}
+
{t(`${i18nPrefix}.back`)}
{/* List */} -
+
{list.map((iteration, index) => (
-
{t(`${i18nPrefix}.iteration`)} {index + 1}
+
{t(`${i18nPrefix}.iteration`)} {index + 1}
= ({ }} onClick={handleNotBubble} > -
+
{main}
diff --git a/web/app/components/workflow/run/output-panel.tsx b/web/app/components/workflow/run/output-panel.tsx index 67030a05fe..3860ecc58e 100644 --- a/web/app/components/workflow/run/output-panel.tsx +++ b/web/app/components/workflow/run/output-panel.tsx @@ -19,7 +19,7 @@ const OutputPanel: FC = ({ height, }) => { return ( -
+
{isRunning && (
diff --git a/web/app/components/workflow/run/result-panel.tsx b/web/app/components/workflow/run/result-panel.tsx index 187ee5d55b..11272ad54f 100644 --- a/web/app/components/workflow/run/result-panel.tsx +++ b/web/app/components/workflow/run/result-panel.tsx @@ -36,7 +36,7 @@ const ResultPanel: FC = ({ }) => { const { t } = useTranslation() return ( -
+
= ({ )}
-
+
= ({ }) => { const { t } = useTranslation() return ( -
+
{isRunning && !outputs && (
@@ -28,7 +28,7 @@ const ResultText: FC = ({ )} {!isRunning && error && (
-
+
{error}
diff --git a/web/app/components/workflow/run/tracing-panel.tsx b/web/app/components/workflow/run/tracing-panel.tsx index c80bcb41db..de2eb09b39 100644 --- a/web/app/components/workflow/run/tracing-panel.tsx +++ b/web/app/components/workflow/run/tracing-panel.tsx @@ -10,7 +10,7 @@ type TracingPanelProps = { const TracingPanel: FC = ({ list, onShowIterationDetail }) => { return ( -
+
{list.map(node => (