Add a since-you-last-looked summary, 30-day uptime ribbons, a maintenance timeline and hover timestamps
- Dashboard card on what changed since the user pressed Got it (users.last_looked_at, migration 0021), folding each problem and its recovery into one line. - Uptime ribbons on servers and integrations, built from the audit log; integrations' failing/working-again moments are now recorded. - Timeline of running and scheduled maintenance windows on the Maintenance page. - TimeAgo component: relative times with the exact time in the chosen format on hover. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3945c60681
commit
906220040e
32 files changed
+3380
-15
No files matched your search
@@ -3,6 +3,8 @@ import { Link, useSearchParams } from "react-router-dom";
|
||||
import { api, type CurrentUser, type ServerRecord } from "../api/client";
|
||||
import CopyButton from "../components/CopyButton";
|
||||
import { formatDateTime } from "../utils/date";
|
||||
import TimeAgo from "../components/TimeAgo";
|
||||
import UptimeRibbon from "../components/UptimeRibbon";
|
||||
import { useSortable } from "../hooks/useSortable";
|
||||
import SortableTh from "../components/SortableTh";
|
||||
import { usePagination } from "../hooks/usePagination";
|
||||
@@ -291,6 +293,7 @@ export default function Servers({ user }: { user: CurrentUser }) {
|
||||
direction={sortDir}
|
||||
onSort={requestSort}
|
||||
/>
|
||||
<th>Last 30 days</th>
|
||||
<th className="w-1">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -307,7 +310,10 @@ export default function Servers({ user }: { user: CurrentUser }) {
|
||||
</div>
|
||||
</td>
|
||||
<td className="text-secondary">{s.apiTokenPrefix}…</td>
|
||||
<td>{s.lastSeenAt ? formatDateTime(new Date(s.lastSeenAt)) : "never"}</td>
|
||||
<td>{s.lastSeenAt ? <TimeAgo value={s.lastSeenAt} /> : "never"}</td>
|
||||
<td>
|
||||
<UptimeRibbon kind="servers" id={s.id} name={s.name} />
|
||||
</td>
|
||||
<td>
|
||||
<div className="btn-list flex-nowrap">
|
||||
<button className="btn btn-sm" onClick={() => rotateToken(s.id)}>
|
||||
@@ -325,7 +331,7 @@ export default function Servers({ user }: { user: CurrentUser }) {
|
||||
))}
|
||||
{sortedServers?.length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={6} className="text-secondary text-center">
|
||||
<td colSpan={7} className="text-secondary text-center">
|
||||
No servers registered yet.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -410,7 +416,10 @@ export default function Servers({ user }: { user: CurrentUser }) {
|
||||
</div>
|
||||
)}
|
||||
<div className="text-secondary small mt-2">
|
||||
{s.lastSeenAt ? `Last seen ${formatDateTime(new Date(s.lastSeenAt))}` : "Never reported"}
|
||||
{s.lastSeenAt ? <>Last seen <TimeAgo value={s.lastSeenAt} /></> : "Never reported"}
|
||||
</div>
|
||||
<div className="mt-2">
|
||||
<UptimeRibbon kind="servers" id={s.id} name={s.name} />
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
Reference in new issue
Block a user