Skip to content

Commit

Permalink
fix: calculate duration dynamically
Browse files Browse the repository at this point in the history
Signed-off-by: warjiang <[email protected]>
  • Loading branch information
warjiang committed Jan 20, 2025
1 parent d5c5d59 commit f41cc30
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import styles from './index.module.less';
import { WorkloadKind } from '@/services/base.ts';
import { cn } from '@/utils/cn';
import TagList, { convertLabelToTags } from '@/components/tag-list';
import { calculateDuration } from '@/utils/time.ts';

export interface WorkloadDetailDrawerProps {
open: boolean;
Expand Down Expand Up @@ -140,7 +141,7 @@ const WorkloadDetailDrawer: FC<WorkloadDetailDrawerProps> = (props) => {
'4a6341a8bcc68e0b7120dbc89014b6a2',
'持续时间',
)}
value="2h"
value={calculateDuration(detailData?.objectMeta?.creationTimestamp)}
/>
<Statistic
className={styles['no-value']}
Expand Down

0 comments on commit f41cc30

Please sign in to comment.