feat: enhance formatUptime to include minutes
- Now formats as "Xd Yh Zm", "Yh Zm", or "Zm" depending on value size - Backlog: mark Uptime Duration as done Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -30,8 +30,8 @@
|
|||||||
- **Status: done (merged to main)**
|
- **Status: done (merged to main)**
|
||||||
|
|
||||||
### Uptime Duration
|
### Uptime Duration
|
||||||
- Format uptime seconds to "3d 4h 12m" via `formatUptime()` helper
|
- `formatUptime()` now formats to "3d 4h 12m" (days, hours, minutes). Falls back to "4h 12m" or "12m" when days aren't needed.
|
||||||
- Note: node card already shows uptime as raw seconds
|
- **Status: done (merged to main)**
|
||||||
|
|
||||||
### Search / Filter
|
### Search / Filter
|
||||||
- Client-side text input filtering table rows by name/node/status
|
- Client-side text input filtering table rows by name/node/status
|
||||||
|
|||||||
@@ -26,7 +26,10 @@ function formatUptime(seconds) {
|
|||||||
if (!seconds) return 'N/A';
|
if (!seconds) return 'N/A';
|
||||||
const days = Math.floor(seconds / 86400);
|
const days = Math.floor(seconds / 86400);
|
||||||
const hours = Math.floor((seconds % 86400) / 3600);
|
const hours = Math.floor((seconds % 86400) / 3600);
|
||||||
return `${days}d ${hours}h`;
|
const minutes = Math.floor((seconds % 3600) / 60);
|
||||||
|
if (days) return `${days}d ${hours}h ${minutes}m`;
|
||||||
|
if (hours) return `${hours}h ${minutes}m`;
|
||||||
|
return `${minutes}m`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user