File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { CreateServiceForm } from "~/components/cloud/CreateServiceForm";
55import { cache , createAsync , A , type RouteDefinition } from "@solidjs/router" ;
66import { getUser } from "~/lib/auth" ;
77import { StatusBadge } from "~/components/cloud/service/StatusBadge" ;
8+ import humanizeDuration from "humanize-duration" ;
89
910const getServices = cache ( async ( ) => {
1011 "use server" ;
@@ -63,11 +64,24 @@ export default () => {
6364 />
6465 </ td >
6566 < td >
66- { new Date (
67- service . raw . status . conditions . find (
68- ( condition ) => condition . type === "RoutesReady"
69- ) . lastTransitionTime
70- ) . toLocaleString ( ) }
67+ < div
68+ class = "tooltip"
69+ data-tip = { new Date (
70+ service . raw . status . conditions . find (
71+ ( condition ) => condition . type === "Ready"
72+ ) ?. lastTransitionTime
73+ ) . toLocaleString ( ) }
74+ >
75+ { humanizeDuration (
76+ new Date (
77+ service . raw . status . conditions . find (
78+ ( condition ) => condition . type === "Ready"
79+ ) ?. lastTransitionTime
80+ ) . getTime ( ) - Date . now ( ) ,
81+ { round : true , largest : 1 }
82+ ) } { " " }
83+ ago
84+ </ div >
7185 </ td >
7286 < td class = "hidden md:block" >
7387 < a class = "link" href = { service . raw . status . url } >
You can’t perform that action at this time.
0 commit comments