From 53a7be496d3b1b9f112fbea777caf4170ccaa25c Mon Sep 17 00:00:00 2001 From: keting lu Date: Sun, 9 Mar 2025 10:22:20 +0800 Subject: [PATCH] feat: add workflow run result page --- .../[appId]/logs/[runId]/page.tsx | 10 +++++++++ web/app/components/result/index.tsx | 21 +++++++++++++++++++ .../run/text-generation/result/index.tsx | 2 +- web/app/components/workflow/run/index.tsx | 1 + .../components/workflow/run/tracing-panel.tsx | 6 +++--- 5 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 web/app/(commonLayout)/app/(appDetailLayout)/[appId]/logs/[runId]/page.tsx create mode 100644 web/app/components/result/index.tsx diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/logs/[runId]/page.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/logs/[runId]/page.tsx new file mode 100644 index 0000000000..ce2537be72 --- /dev/null +++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/logs/[runId]/page.tsx @@ -0,0 +1,10 @@ +import React from 'react' +import Main from '@/app/components/result' + +const Result = async ({ params }: { params: { appid: string, runId: string } }) => { + return ( +
+ ) +} + +export default Result diff --git a/web/app/components/result/index.tsx b/web/app/components/result/index.tsx new file mode 100644 index 0000000000..8d0047601c --- /dev/null +++ b/web/app/components/result/index.tsx @@ -0,0 +1,21 @@ +'use client' +import type { FC } from 'react' +import { useTranslation } from 'react-i18next' +import Run from '@/app/components/workflow/run' + +type ResultDetail = { + runID: string +} + +const Result: FC = ({ runID }) => { + const { t } = useTranslation() + + return ( +
+

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

+ +
+ ) +} + +export default Result diff --git a/web/app/components/run/text-generation/result/index.tsx b/web/app/components/run/text-generation/result/index.tsx index 682f19fa4e..6f5c4cc1a7 100644 --- a/web/app/components/run/text-generation/result/index.tsx +++ b/web/app/components/run/text-generation/result/index.tsx @@ -350,7 +350,7 @@ const Result: FC = ({ // = ({ hideResult, activeTab = 'RESULT', runID, getRe )} diff --git a/web/app/components/workflow/run/tracing-panel.tsx b/web/app/components/workflow/run/tracing-panel.tsx index 787dc66b49..8a81e011ab 100644 --- a/web/app/components/workflow/run/tracing-panel.tsx +++ b/web/app/components/workflow/run/tracing-panel.tsx @@ -24,7 +24,7 @@ type TracingPanelProps = { className?: string hideNodeInfo?: boolean hideNodeProcessDetail?: boolean - ifForRun?: boolean + isForRun?: boolean } const TracingPanel: FC = ({ @@ -32,7 +32,7 @@ const TracingPanel: FC = ({ className, hideNodeInfo = false, hideNodeProcessDetail = false, - ifForRun = false, + isForRun = false, }) => { const { t } = useTranslation() const treeNodes = formatNodeList(list, t) @@ -140,7 +140,7 @@ const TracingPanel: FC = ({ {node?.parallelDetail?.branchTitle} { - ifForRun ?