Show last listing update time next to connection status in header
Add last_updated timestamp to /api/status endpoint by querying MAX(last_seen) across both listing tables. Display it in the HealthIndicator as relative time (e.g. "2h ago") with full date/time in the tooltip on hover.
This commit is contained in:
parent
7833bd3ecf
commit
2d6726dcd7
5 changed files with 55 additions and 5 deletions
|
|
@ -6,6 +6,7 @@ export interface HealthCheckResult {
|
|||
status: HealthStatus;
|
||||
latencyMs?: number;
|
||||
error?: string;
|
||||
lastUpdated?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -39,6 +40,7 @@ export async function checkBackendHealth(): Promise<HealthCheckResult> {
|
|||
return {
|
||||
status: 'healthy',
|
||||
latencyMs,
|
||||
lastUpdated: data.last_updated ?? undefined,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue