Lifecycle planning, and consistent empty and loading states

- Inventory: end of support and replacement cost per asset; a Lifecycle page showing what ages out year by year and what replacing it will cost; support ending within 90 days in the weekly digest
- Lists: a shared empty state saying what is missing, why, and the one thing to do; "nothing matches" with a clear button; skeleton rows instead of empty-looking lists while loading

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-18 23:18:42 +02:00
1 parent 92726568b7
commit 846af02851
50 files changed
+4434 -233

No files matched your search

+8 -17
View File
@@ -22,6 +22,7 @@ import { useTableSearch } from "../hooks/useTableSearch";
import SaveViewButton from "../components/SaveViewButton";
import { agentState } from "../utils/agent";
import { BlockSkeleton } from "../components/Skeleton";
import EmptyState, { EmptyRow, LoadingRow } from "../components/EmptyState";
function typeBadgeStyle(colors: Record<string, string>, type: string): CSSProperties {
const color = colors[type];
@@ -462,12 +463,9 @@ export default function Servers({ user }: { user: CurrentUser }) {
</td>
</tr>
))}
{!loaded && <LoadingRow colSpan={7} />}
{loaded && sortedServers?.length === 0 && (
<tr>
<td colSpan={7} className="text-secondary text-center">
No servers registered yet.
</td>
</tr>
<EmptyRow colSpan={7} title="No servers yet" hint="Add a server with the form above and install its agent: it then reports its tasks, disks, memory, open ports and waiting updates." filtered={tableSearch.active ? () => tableSearch.setQuery("") : undefined} />
)}
</tbody>
</table>
@@ -483,18 +481,11 @@ export default function Servers({ user }: { user: CurrentUser }) {
</div>
) : servers.length === 0 ? (
<div className="card">
<div className="card-body text-secondary">
No servers registered yet.
{isAdmin && (
<>
{" "}
<button className="btn btn-link p-0 align-baseline" onClick={() => setManagingServers(true)}>
Add one
</button>
.
</>
)}
</div>
<EmptyState
title="No servers yet"
hint="Add a server and install its agent: it then reports its tasks, disks, memory, open ports and waiting updates, and the app can tell when it goes quiet."
action={isAdmin ? { label: "Add a server", onClick: () => setManagingServers(true) } : undefined}
/>
</div>
) : (
<>