Skip to content

Commit

Permalink
enhance: improve empty data display for detail panel (langgenius#8266)
Browse files Browse the repository at this point in the history
  • Loading branch information
DDDDD12138 authored and lau-td committed Oct 23, 2024
1 parent 64a53ac commit 43d020c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions web/app/components/workflow/run/meta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Props = {
const MetaData: FC<Props> = ({
status,
executor,
startTime = 0,
startTime,
time,
tokens,
steps = 1,
Expand Down Expand Up @@ -64,7 +64,7 @@ const MetaData: FC<Props> = ({
<div className='my-[5px] w-[72px] h-2 rounded-sm bg-[rgba(0,0,0,0.05)]'/>
)}
{status !== 'running' && (
<span>{formatTime(startTime, t('appLog.dateTimeFormat') as string)}</span>
<span>{startTime ? formatTime(startTime, t('appLog.dateTimeFormat') as string) : '-'}</span>
)}
</div>
</div>
Expand All @@ -75,7 +75,7 @@ const MetaData: FC<Props> = ({
<div className='my-[5px] w-[72px] h-2 rounded-sm bg-[rgba(0,0,0,0.05)]'/>
)}
{status !== 'running' && (
<span>{`${time?.toFixed(3)}s`}</span>
<span>{time ? `${time.toFixed(3)}s` : '-'}</span>
)}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/app/components/workflow/run/status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const StatusPanel: FC<ResultProps> = ({
<div className='w-16 h-2 rounded-sm bg-[rgba(0,0,0,0.05)]' />
)}
{status !== 'running' && (
<span>{`${time?.toFixed(3)}s`}</span>
<span>{time ? `${time?.toFixed(3)}s` : '-'}</span>
)}
</div>
</div>
Expand Down

0 comments on commit 43d020c

Please sign in to comment.