Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix: convert ISO date strings to timestamps for formatRelativeTime

rcourtmanb79183ac76b3
diff --git a/frontend-modern/src/components/Settings/APITokenManager.tsx b/frontend-modern/src/components/Settings/APITokenManager.tsx
index 208b42f9d7..df22331af1 100644
--- a/frontend-modern/src/components/Settings/APITokenManager.tsx
+++ b/frontend-modern/src/components/Settings/APITokenManager.tsx
@@ -222,10 +222,10 @@ export const APITokenManager: Component<APITokenManagerProps> = (props) => {
<td class="py-2 px-3 text-gray-900 dark:text-gray-100">{token.name || 'Untitled token'}</td>
<td class="py-2 px-3 font-mono text-xs text-gray-600 dark:text-gray-400">{tokenHint(token)}</td>
<td class="py-2 px-3 text-gray-600 dark:text-gray-400">
- {formatRelativeTime(token.createdAt)}
+ {formatRelativeTime(new Date(token.createdAt).getTime())}
</td>
<td class="py-2 px-3 text-gray-600 dark:text-gray-400">
- {token.lastUsedAt ? formatRelativeTime(token.lastUsedAt) : 'Never'}
+ {token.lastUsedAt ? formatRelativeTime(new Date(token.lastUsedAt).getTime()) : 'Never'}
</td>
<td class="py-2 px-3 text-right">
<button
diff --git a/frontend-modern/src/components/Settings/DockerAgents.tsx b/frontend-modern/src/components/Settings/DockerAgents.tsx
index 62c5a5af2b..296cfba7ce 100644
--- a/frontend-modern/src/components/Settings/DockerAgents.tsx
+++ b/frontend-modern/src/components/Settings/DockerAgents.tsx
@@ -336,7 +336,7 @@ WantedBy=multi-user.target`;
{token.prefix && token.suffix ? `${token.prefix}…${token.suffix}` : '—'}
</td>
<td class="py-2 px-2 text-gray-600 dark:text-gray-400">
- {token.lastUsedAt ? formatRelativeTime(token.lastUsedAt) : 'Never'}
+ {token.lastUsedAt ? formatRelativeTime(new Date(token.lastUsedAt).getTime()) : 'Never'}
</td>
</tr>
)}