Hub 2.6.0: paged lists, job status filters, one-product updates, installs found on servers
- Jobs: Succeeded/Cancelled filters, product, type and church search, paged on the server; audit log and alerts paged on the server with search; every other list paged. - Updates: one product at a time with its own releases; an Events update pins the church's Accounts (or updates it when the release needs it, or installs it first); fixes the requirement check comparing an object. - A status job adds installs found on a server and ties them to their registration; unlinked registered sites trigger one (daily); heartbeats tie install records too; the install page shows its registration. 13 new tests (209). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,8 @@ import Link from "next/link";
|
||||
import { Copy, Plus } from "lucide-react";
|
||||
import { api, errorText } from "@/lib/api";
|
||||
import { ago, bytes } from "@/lib/format";
|
||||
import { Loading, Message, PageTitle } from "@/components/ui";
|
||||
import { usePaged } from "@/lib/paging";
|
||||
import { Loading, Message, PageTitle, Pager } from "@/components/ui";
|
||||
import { ServersNav, StatusPill, pct, type ServerSummary } from "@/components/servers";
|
||||
|
||||
type Msg = { type: "ok" | "err"; text: string } | null;
|
||||
@@ -13,6 +14,7 @@ type Msg = { type: "ok" | "err"; text: string } | null;
|
||||
/** Hub → Servers: every server with its agent, resources and sites; Add server (§3, §10). */
|
||||
export default function ServersPage() {
|
||||
const [list, setList] = useState<ServerSummary[] | null>(null);
|
||||
const paged = usePaged(list || [], null, 20);
|
||||
const [msg, setMsg] = useState<Msg>(null);
|
||||
const [adding, setAdding] = useState(false);
|
||||
const [name, setName] = useState("");
|
||||
@@ -67,7 +69,7 @@ export default function ServersPage() {
|
||||
|
||||
{!list ? <Loading /> : list.length === 0 ? <p className="text-sm text-slate-500">No servers yet. Add one to install churches from the Hub.</p> : (
|
||||
<div className="grid gap-4 md:grid-cols-2">
|
||||
{list.map(s => {
|
||||
{paged.rows.map(s => {
|
||||
const disk = s.disk.reduce((m, d) => Math.max(m, d.totalBytes ? (d.usedBytes / d.totalBytes) * 100 : 0), 0);
|
||||
return (
|
||||
<Link key={s.id} href={`/servers/${s.id}`} className="card block hover:border-indigo-300">
|
||||
@@ -99,6 +101,7 @@ export default function ServersPage() {
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
{list && <div className="mt-4"><Pager {...paged} /></div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user