Skip to content

Commit 7c9faf7

Browse files
FIX (healthckeck): Fix data formats on UI
1 parent 58d8a48 commit 7c9faf7

File tree

6 files changed

+1124
-6
lines changed

6 files changed

+1124
-6
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
### 🐘 **PostgreSQL Support**
4141

42-
- **Multiple versions**: PostgreSQL 13, 14, 15, 16, and 17
42+
- **Multiple versions**: PostgreSQL 13, 14, 15, 16 and 17
4343
- **SSL support**: Secure connections available
4444
- **Easy restoration**: One-click restore from any backup
4545

@@ -49,6 +49,14 @@
4949
- **Privacy-first**: All your data stays on your infrastructure
5050
- **Open source**: MIT licensed, inspect every line of code
5151

52+
### 📊 **Monitoring & Insights**
53+
54+
- **Real-time metrics**: Track database health
55+
- **Historical data**: View trends and patterns over time
56+
- **Alert system**: Get notified when issues are detected
57+
58+
<img src="assets/healthchecks.svg" alt="Postgresus Dashboard" width="800"/>
59+
5260
---
5361

5462
## 📦 Installation
@@ -148,4 +156,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
148156

149157
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
150158

151-
To see diagrams it is recommended to install "Markdown Preview Enhanced" plugin
159+
To see diagrams it is recommended to install "Markdown Preview Enhanced" plugin

assets/dashboard.svg

Lines changed: 852 additions & 1 deletion
Loading

assets/healthchecks.svg

Lines changed: 258 additions & 0 deletions
Loading

frontend/src/features/databases/ui/DatabaseCardComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const DatabaseCardComponent = ({
3636
{database.healthStatus && (
3737
<div className="ml-auto pl-1">
3838
<div
39-
className={`rounded p-1 px-2 text-xs text-white ${
39+
className={`rounded px-[6px] py-[2px] text-[10px] text-white ${
4040
database.healthStatus === HealthStatus.AVAILABLE ? 'bg-green-500' : 'bg-red-500'
4141
}`}
4242
>

frontend/src/features/healthcheck/ui/HealthckeckAttemptsComponent.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useEffect, useState } from 'react';
55
import type { Database } from '../../../entity/databases';
66
import { HealthStatus } from '../../../entity/databases/model/HealthStatus';
77
import { type HealthcheckAttempt, healthcheckAttemptApi } from '../../../entity/healthcheck';
8+
import { getUserShortTimeFormat } from '../../../shared/time/getUserTimeFormat';
89

910
interface Props {
1011
database: Database;
@@ -115,7 +116,7 @@ export const HealthckeckAttemptsComponent = ({ database }: Props) => {
115116
healthcheckAttempts.map((healthcheckAttempt) => (
116117
<Tooltip
117118
key={healthcheckAttempt.createdAt.toString()}
118-
title={`${dayjs(healthcheckAttempt.createdAt).format('DD.MM.YYYY HH:mm')} (${dayjs(healthcheckAttempt.createdAt).fromNow()})`}
119+
title={`${dayjs(healthcheckAttempt.createdAt).format(getUserShortTimeFormat().format)} (${dayjs(healthcheckAttempt.createdAt).fromNow()})`}
119120
>
120121
<div
121122
className={`h-[8px] w-[8px] cursor-pointer rounded-[2px] ${

frontend/src/shared/time/getUserTimeFormat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ export const getUserShortTimeFormat = () => {
1818

1919
return {
2020
use12Hours: is12Hour,
21-
format: is12Hour ? 'DD.MM.YYYY h:mm A' : 'DD.MM.YYYY HH:mm',
21+
format: is12Hour ? 'DD MMM YYYY h:mm A' : 'DD MMM YYYY HH:mm',
2222
};
2323
};

0 commit comments

Comments
 (0)