feat: Enhance Uptime heartbeat bar

- Frontend: Increase heartbeat history to 60 items (1 hour)
- Frontend: Add empty bars for alignment when history is sparse
- Frontend: Improve tooltips with detailed status info
- Frontend: Update API client to support limit parameter
This commit is contained in:
Wikid82
2025-11-23 23:50:04 +00:00
parent 527c54582f
commit 642d4d2437
3 changed files with 51 additions and 12 deletions

View File

@@ -26,7 +26,7 @@ export const getMonitors = async () => {
return response.data;
};
export const getMonitorHistory = async (id: string) => {
const response = await client.get<UptimeHeartbeat[]>(`/uptime/monitors/${id}/history`);
export const getMonitorHistory = async (id: string, limit: number = 50) => {
const response = await client.get<UptimeHeartbeat[]>(`/uptime/monitors/${id}/history?limit=${limit}`);
return response.data;
};