diff --git a/CHANGELOG.md b/CHANGELOG.md index c3443a1..2bca458 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,27 @@ versions follow [Semantic Versioning](https://semver.org/). ## [Unreleased] +## [1.3.0] - 2026-10-28 + +### Added + +- **Search and pages on every list.** Installs (searchable by church, address or version, with a + health filter: critical, warnings, healthy, behind latest), Customers (name, contact, email, + phone or site) and Alerts (message or install) each have a search box. Lists show 25 at a time + with previous/next. The minute-by-minute refresh on Installs keeps you on the page you're on. + An install's History shows 20 at a time. + +### Changed + +- **Settings is split into tabs**: Releases and alerts, Email, Login and security, and Audit log. + The open tab is kept in the address (`/settings#email`), so a reload or a link lands on it. The + audit log has a search box and shows 30 entries at a time. + +### Fixed + +- **Sign out** stayed at the bottom of the page on long pages, so it scrolled out of view. The + side navigation now stays fixed to the window height. + ## [1.2.0] - 2026-10-28 ### Added diff --git a/backend/package-lock.json b/backend/package-lock.json index 6356251..de2c778 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -1,12 +1,12 @@ { "name": "events-hub-backend", - "version": "1.2.0", + "version": "1.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "events-hub-backend", - "version": "1.2.0", + "version": "1.3.0", "hasInstallScript": true, "dependencies": { "@prisma/adapter-pg": "^7.10.1", diff --git a/backend/package.json b/backend/package.json index 7577484..af5d62f 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "events-hub-backend", - "version": "1.2.0", + "version": "1.3.0", "private": true, "description": "Cross Events Hub β€” API for managing Cross Events installs, licences and heartbeats", "main": "src/index.js", diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 447ced7..0de8f29 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "events-hub-frontend", - "version": "1.2.0", + "version": "1.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "events-hub-frontend", - "version": "1.2.0", + "version": "1.3.0", "dependencies": { "lucide-react": "^0.536.0", "next": "^15.5.24", diff --git a/frontend/package.json b/frontend/package.json index 2048e03..e4848d3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "events-hub-frontend", - "version": "1.2.0", + "version": "1.3.0", "private": true, "scripts": { "dev": "next dev -p 3200", diff --git a/frontend/src/app/(hub)/alerts/page.tsx b/frontend/src/app/(hub)/alerts/page.tsx index 8dbb490..dc43027 100644 --- a/frontend/src/app/(hub)/alerts/page.tsx +++ b/frontend/src/app/(hub)/alerts/page.tsx @@ -1,29 +1,35 @@ "use client"; -import React, { useEffect, useState } from "react"; +import React, { useEffect, useMemo, useState } from "react"; import Link from "next/link"; import { api, errorText } from "@/lib/api"; import { ago, fmtDate } from "@/lib/format"; +import { matches, usePaged } from "@/lib/paging"; import type { InstallEvent } from "@/lib/types"; -import { Badge, Loading, PageTitle } from "@/components/ui"; +import { Badge, Loading, PageTitle, Pager, SearchInput } from "@/components/ui"; /** Open alerts, and the history of everything that happened to installs. */ export default function AlertsPage() { const [openOnly, setOpenOnly] = useState(true); const [events, setEvents] = useState(null); const [error, setError] = useState(null); + const [query, setQuery] = useState(""); useEffect(() => { setEvents(null); api(`/api/admin/events${openOnly ? "?open=true" : ""}`).then(setEvents).catch(e => setError(errorText(e))); }, [openOnly]); + const shown = useMemo(() => (events || []).filter(e => matches(query, e.message, e.level, e.install?.name, e.install?.url)), [events, query]); + const paged = usePaged(shown, `${query}|${openOnly}`); + return ( <> - -
+ +
+
{error &&

{error}

} {!events ? : events.length === 0 ?

{openOnly ? "No open alerts. πŸŽ‰" : "Nothing yet."}

: ( @@ -31,7 +37,8 @@ export default function AlertsPage() { - {events.map(e => ( + {paged.rows.length === 0 && } + {paged.rows.map(e => ( @@ -41,6 +48,7 @@ export default function AlertsPage() { ))}
WhenInstallWhatState
No alerts match.
{fmtDate(e.createdAt)} {e.install ? {e.install.name} : "β€”"}
+
)} diff --git a/frontend/src/app/(hub)/customers/page.tsx b/frontend/src/app/(hub)/customers/page.tsx index 4421efb..94d6251 100644 --- a/frontend/src/app/(hub)/customers/page.tsx +++ b/frontend/src/app/(hub)/customers/page.tsx @@ -1,13 +1,14 @@ "use client"; -import React, { useCallback, useEffect, useState } from "react"; +import React, { useCallback, useEffect, useMemo, useState } from "react"; import Link from "next/link"; import { useRouter } from "next/navigation"; import { Plus } from "lucide-react"; import { api, errorText } from "@/lib/api"; import { ago } from "@/lib/format"; +import { matches, usePaged } from "@/lib/paging"; import type { Customer } from "@/lib/types"; -import { Badge, Loading, Message, PageTitle } from "@/components/ui"; +import { Badge, Loading, Message, PageTitle, Pager, SearchInput } from "@/components/ui"; export default function CustomersPage() { const router = useRouter(); @@ -16,6 +17,10 @@ export default function CustomersPage() { const [form, setForm] = useState({ name: "", contactName: "", email: "", phone: "" }); const [msg, setMsg] = useState<{ type: "ok" | "err"; text: string } | null>(null); + const [query, setQuery] = useState(""); + const shown = useMemo(() => (list || []).filter(c => matches(query, c.name, c.contactName, c.email, c.phone, ...c.installs.map(i => i.url))), [list, query]); + const paged = usePaged(shown, query); + const load = useCallback(() => api("/api/admin/customers").then(setList).catch(e => setMsg({ type: "err", text: errorText(e) })), []); useEffect(() => { load(); }, [load]); @@ -41,11 +46,14 @@ export default function CustomersPage() { )} {!list ? : list.length === 0 ?

No customers yet.

: ( + <> +
- {list.map(c => ( + {paged.rows.length === 0 && } + {paged.rows.map(c => ( @@ -54,7 +62,9 @@ export default function CustomersPage() { ))}
CustomerLicencesSite
No customers match.
{c.name}
{[c.contactName, c.email].filter(Boolean).join(" Β· ")}
{c.licences.length ? c.licences.map(l => ) : none}
+
+ )} ); diff --git a/frontend/src/app/(hub)/installs/[id]/page.tsx b/frontend/src/app/(hub)/installs/[id]/page.tsx index b87fefa..114fbd6 100644 --- a/frontend/src/app/(hub)/installs/[id]/page.tsx +++ b/frontend/src/app/(hub)/installs/[id]/page.tsx @@ -6,8 +6,9 @@ import { useParams } from "next/navigation"; import { ArrowLeft } from "lucide-react"; import { api, errorText } from "@/lib/api"; import { ago, bytes, fmtDate, rand } from "@/lib/format"; +import { usePaged } from "@/lib/paging"; import type { Health, InstallEvent, InstallSummary, Licence, Stats } from "@/lib/types"; -import { Badge, Loading, Message, PageTitle } from "@/components/ui"; +import { Badge, Loading, Message, PageTitle, Pager } from "@/components/ui"; type Detail = { id: string; name: string; url: string; version: string | null; protocolVersion: number; timezone: string | null; notes: string | null; @@ -21,7 +22,9 @@ type Detail = { heartbeats: { receivedAt: string; version: string | null; stats: Stats | null }[]; }; -const Row = ({ k, v }: { k: string; v: React.ReactNode }) => ( +const NO_EVENTS: InstallEvent[] = []; + +const Row =({ k, v }: { k: string; v: React.ReactNode }) => (
{k}{v}
); @@ -34,6 +37,7 @@ export default function InstallPage() { const load = useCallback(() => api(`/api/admin/installs/${id}`).then(x => { setD(x); setNotes(x.notes || ""); }).catch(e => setMsg({ type: "err", text: errorText(e) })), [id]); useEffect(() => { load(); }, [load]); + const history = usePaged(d?.events || NO_EVENTS, id, 20); if (!d) return msg ? : ; const h = d.health || {}; @@ -134,8 +138,9 @@ export default function InstallPage() {

History

{d.events.length === 0 ?

Nothing yet.

: ( + <>
    - {d.events.map(e => ( + {history.rows.map(e => (
  • {fmtDate(e.createdAt)} @@ -144,6 +149,8 @@ export default function InstallPage() {
  • ))}
+
+ )}
diff --git a/frontend/src/app/(hub)/layout.tsx b/frontend/src/app/(hub)/layout.tsx index 7e1b00b..9592f63 100644 --- a/frontend/src/app/(hub)/layout.tsx +++ b/frontend/src/app/(hub)/layout.tsx @@ -33,7 +33,8 @@ export default function HubLayout({ children }: { children: React.ReactNode }) { return (
-