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

+5 -10
View File
@@ -17,6 +17,7 @@ import { downloadCsv } from "../utils/csv";
import { formatAgo } from "../utils/duration";
import { confirmDialog } from "../utils/dialogs";
import { ErrorNotice } from "../components/Notice";
import { EmptyRow, LoadingRow } from "../components/EmptyState";
const emptyForm: PortForwardInput = {
label: "",
@@ -229,12 +230,9 @@ export default function Ports({ user }: { user: CurrentUser }) {
<td className="text-secondary"><TimeAgo value={p.lastSeenAt} /></td>
</tr>
))}
{agentPorts === null && <LoadingRow colSpan={6} />}
{agentPorts !== null && agentPorts.length === 0 && (
<tr>
<td colSpan={6} className="text-secondary text-center">
No servers have reported listening ports yet.
</td>
</tr>
<EmptyRow colSpan={6} title="No listening ports reported yet" hint="Each server's agent lists what is listening with its next report. Install or update the agent to see ports here." action={{ label: "Go to Servers", to: "/servers" }} />
)}
</tbody>
</table>
@@ -418,12 +416,9 @@ export default function Ports({ user }: { user: CurrentUser }) {
)}
</tr>
))}
{forwards === null && <LoadingRow colSpan={canEdit ? 6 : 5} />}
{forwards !== null && forwards.length === 0 && (
<tr>
<td colSpan={canEdit ? 6 : 5} className="text-secondary text-center">
No manual port openings recorded yet.
</td>
</tr>
<EmptyRow colSpan={canEdit ? 6 : 5} title="No port openings recorded" hint="Write down what is forwarded through the router or opened by hand, so it isn't forgotten." action={canEdit ? { label: "Record one", onClick: startAdd } : undefined} />
)}
</tbody>
</table>