Hub 2.0 step 3: releases per product, with requirements
- Release.product and requires; unique (product, version); latest version per product (latest_version stays Cross Events' latest) - Release sources per product (Releases page): repository, tag prefix, notes file. Defaults: every product from crosscode-platform plus Cross Events' v1.2.3 tags from hope-events. A product's releases are only removed when all its sources were read and found tags - "— requires accounts 1.2.0" in a notes heading: Request update answers 409 REQUIREMENT_NOT_MET until the church's install of that product is new enough; install page and Releases page show it; v2 replies carry requires - @crosscode/contracts 1.1.0 vendored (optional requires on releases) - Alerts, dashboard and install lists compare against each product's latest Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,11 +6,12 @@ import { api, errorText } from "@/lib/api";
|
||||
import { ago, fmtDate } from "@/lib/format";
|
||||
import { matches, usePaged } from "@/lib/paging";
|
||||
import type { InstallSummary } from "@/lib/types";
|
||||
import { PRODUCT_NAMES } from "@/lib/products";
|
||||
import { PRODUCTS, PRODUCT_NAMES, type Product } from "@/lib/products";
|
||||
import { Badge, Loading, PageTitle, Pager, SearchInput, Stat } from "@/components/ui";
|
||||
|
||||
type Dashboard = {
|
||||
latestVersion: string | null;
|
||||
latestVersions: Partial<Record<Product, string>>;
|
||||
counts: { installs: number; healthy: number; warning: number; critical: number; behind: number; customers: number; openAlerts: number; licences: Record<string, number> };
|
||||
installs: InstallSummary[];
|
||||
};
|
||||
@@ -50,7 +51,12 @@ export default function OverviewPage() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageTitle title="Installs" subtitle={data.latestVersion ? `Latest release: ${data.latestVersion}` : "Add the latest release on the Releases page to see who is behind."} />
|
||||
<PageTitle
|
||||
title="Installs"
|
||||
subtitle={PRODUCTS.some(p => data.latestVersions[p])
|
||||
? `Latest releases: ${PRODUCTS.filter(p => data.latestVersions[p]).map(p => `${PRODUCT_NAMES[p]} ${data.latestVersions[p]}`).join(" · ")}`
|
||||
: "Releases appear on the Releases page once they're tagged; then you can see who is behind."}
|
||||
/>
|
||||
<div className="mb-6 grid grid-cols-2 gap-3 md:grid-cols-5">
|
||||
<Stat label="Installs" value={c.installs} />
|
||||
<Stat label="Healthy" value={c.healthy} tone="green" />
|
||||
@@ -88,7 +94,7 @@ export default function OverviewPage() {
|
||||
<Badge value={i.status} />
|
||||
{i.problems.filter(p => p.level !== "info").map(p => <div key={p.type} className="mt-1 text-xs text-slate-600">{p.message}</div>)}
|
||||
</td>
|
||||
<td className="p-3 whitespace-nowrap">{i.version || "—"}{i.behind && <span className="ml-1 text-xs text-amber-700">(behind)</span>}</td>
|
||||
<td className="p-3 whitespace-nowrap">{i.version || "—"}{i.behind && <span className="ml-1 text-xs text-amber-700">(latest {i.latestVersion})</span>}</td>
|
||||
<td className="p-3 whitespace-nowrap">
|
||||
{i.licence ? <><Badge value={i.licence.status} />{i.licence.expiresAt && <div className="mt-1 text-xs text-slate-500">to {fmtDate(i.licence.expiresAt, false)}</div>}</> : <span className="text-xs text-slate-400">none</span>}
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user