From 43d020c405df5c4a62c9e4df430146cb6d3af4d3 Mon Sep 17 00:00:00 2001 From: DDDDD12138 <43703884+DDDDD12138@users.noreply.github.com> Date: Wed, 11 Sep 2024 18:24:18 +0800 Subject: [PATCH] enhance: improve empty data display for detail panel (#8266) --- web/app/components/workflow/run/meta.tsx | 6 +++--- web/app/components/workflow/run/status.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/app/components/workflow/run/meta.tsx b/web/app/components/workflow/run/meta.tsx index 86eb221ad92f69..b2d7269a51aab3 100644 --- a/web/app/components/workflow/run/meta.tsx +++ b/web/app/components/workflow/run/meta.tsx @@ -16,7 +16,7 @@ type Props = { const MetaData: FC = ({ status, executor, - startTime = 0, + startTime, time, tokens, steps = 1, @@ -64,7 +64,7 @@ const MetaData: FC = ({
)} {status !== 'running' && ( - {formatTime(startTime, t('appLog.dateTimeFormat') as string)} + {startTime ? formatTime(startTime, t('appLog.dateTimeFormat') as string) : '-'} )}
@@ -75,7 +75,7 @@ const MetaData: FC = ({
)} {status !== 'running' && ( - {`${time?.toFixed(3)}s`} + {time ? `${time.toFixed(3)}s` : '-'} )}
diff --git a/web/app/components/workflow/run/status.tsx b/web/app/components/workflow/run/status.tsx index 2eeafca95de9f3..0677e434018712 100644 --- a/web/app/components/workflow/run/status.tsx +++ b/web/app/components/workflow/run/status.tsx @@ -71,7 +71,7 @@ const StatusPanel: FC = ({
)} {status !== 'running' && ( - {`${time?.toFixed(3)}s`} + {time ? `${time?.toFixed(3)}s` : '-'} )}