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:
1 parent
92726568b7
commit
846af02851
50 files changed
+4434
-233
No files matched your search
@@ -14,6 +14,7 @@ import { useSortable } from "../hooks/useSortable";
|
||||
import { useTableSearch } from "../hooks/useTableSearch";
|
||||
import { downloadCsv } from "../utils/csv";
|
||||
import { readableError } from "../utils/errors";
|
||||
import { EmptyRow } from "../components/EmptyState";
|
||||
|
||||
interface Row extends CoverageGuest {
|
||||
/** Worst first, so a default sort puts what needs attention at the top. */
|
||||
@@ -300,17 +301,7 @@ export default function Backups({ user }: { user?: CurrentUser }) {
|
||||
</tr>
|
||||
))}
|
||||
{report !== null && sorted?.length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={5} className="text-secondary text-center">
|
||||
{rows.length === 0 ? (
|
||||
<>
|
||||
No Proxmox guests to show. Connect a Proxmox integration under <Link to="/integrations">Integrations</Link>.
|
||||
</>
|
||||
) : (
|
||||
"Nothing matches that."
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
<EmptyRow colSpan={5} {...(rows.length === 0 ? { title: "No Proxmox guests to show", hint: "Connect a Proxmox integration and its virtual machines and containers appear here, with when each was last backed up.", action: { label: "Connect Proxmox", to: "/integrations" } } : { filtered: () => { tableSearch.setQuery(""); setParam("status", null); } })} />
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -439,11 +430,7 @@ export default function Backups({ user }: { user?: CurrentUser }) {
|
||||
</tr>
|
||||
))}
|
||||
{tests !== null && tests.length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={isAdmin ? 5 : 4} className="text-secondary text-center">
|
||||
No restore has been recorded yet.{canRecord ? " After you next try one, record it here." : ""}
|
||||
</td>
|
||||
</tr>
|
||||
<EmptyRow colSpan={isAdmin ? 5 : 4} title="No restore recorded yet" hint="A backup nobody has restored is a hope, not a backup. Try restoring one — to a scratch machine is fine — and record how it went." action={canRecord ? { label: "Record a test", onClick: () => setDraft({ key: null, label: "", testedAt: todayIso(), result: "ok", note: "" }) } : undefined} />
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in new issue
Block a user