File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,14 @@ import {
33 HealthCheck ,
44 HealthCheckStatus
55} from "@flanksource-ui/api/types/health" ;
6+ import { formatDateForTooltip } from "@flanksource-ui/ui/Age/Age" ;
67import { DataTable } from "@flanksource-ui/ui/DataTable" ;
78import { CellContext , ColumnDef } from "@tanstack/react-table" ;
89import clsx from "clsx" ;
10+ import dayjs from "dayjs" ;
911import { useAtom } from "jotai" ;
1012import React , { useEffect , useMemo , useState } from "react" ;
13+ import { Tooltip } from "react-tooltip" ;
1114import { format } from "timeago.js" ;
1215import { toastError } from "../../../Toast/toast" ;
1316import { refreshCheckModalAtomTrigger } from "../../ChecksListing" ;
@@ -23,12 +26,19 @@ const columns: ColumnDef<HealthCheckStatus, any>[] = [
2326 {
2427 header : "Age" ,
2528 id : "age" ,
26- cell : function AgeCell ( {
27- row,
28- getValue
29- } : CellContext < HealthCheckStatus , any > ) {
29+ cell : ( { row } ) => {
3030 const status = row . original ;
31- return < > { format ( `${ status . time } UTC` ) } </ > ;
31+ return (
32+ < >
33+ < span data-tooltip-id = { `age-tooltip-${ status . time } ` } >
34+ { format ( `${ status . time } UTC` ) }
35+ </ span >
36+ < Tooltip
37+ id = { `age-tooltip-${ status . time } ` }
38+ content = { formatDateForTooltip ( dayjs ( status . time ) ) }
39+ />
40+ </ >
41+ ) ;
3242 } ,
3343 aggregatedCell : "" ,
3444 accessorKey : "time"
You can’t perform that action at this time.
0 commit comments