Hub 2.24.1: Servers -> Updates offers every product
The product tabs were a fixed Events/Accounts list from before the Church Website, so Website installs couldn't be batch-updated there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import Link from "next/link";
|
||||
import { api, ApiError, errorText } from "@/lib/api";
|
||||
import { fmtDate } from "@/lib/format";
|
||||
import { usePaged } from "@/lib/paging";
|
||||
import { PRODUCT_NAMES } from "@/lib/products";
|
||||
import { PRODUCTS, PRODUCT_NAMES, type Product } from "@/lib/products";
|
||||
import { ReleaseSelect } from "@/components/ReleaseSelect";
|
||||
import type { Release } from "@/lib/types";
|
||||
import { Loading, Message, PageTitle, Pager, Tabs } from "@/components/ui";
|
||||
@@ -13,9 +13,9 @@ import { ServersNav, StatusPill, toInput, fromInput, type Deployment, type Job }
|
||||
|
||||
type Msg = { type: "ok" | "err"; text: string } | null;
|
||||
const H = 60 * 60 * 1000;
|
||||
/** Products the Hub updates on servers. */
|
||||
const UPDATABLE = ["events", "accounts"] as const;
|
||||
type Updatable = (typeof UPDATABLE)[number];
|
||||
/** Products the Hub updates on servers. 2.24.1: the Church Website and App too (only Events and Accounts were offered). */
|
||||
const UPDATABLE = PRODUCTS;
|
||||
type Updatable = Product;
|
||||
|
||||
const versionOf = (d: Deployment) => d.install?.version || d.version || "?";
|
||||
|
||||
@@ -95,7 +95,7 @@ export default function UpdatesPage() {
|
||||
|
||||
{!all ? <Loading /> : (
|
||||
<form className="card space-y-4" onSubmit={submit}>
|
||||
<Tabs tabs={UPDATABLE.map(p => ({ key: p, label: `${PRODUCT_NAMES[p]} (${(all || []).filter(d => d.product === p).length})` }))} active={product} onChange={pick} />
|
||||
<Tabs tabs={UPDATABLE.filter(p => p !== "app" || (all || []).some(d => d.product === p)).map(p => ({ key: p, label: `${PRODUCT_NAMES[p]} (${(all || []).filter(d => d.product === p).length})` }))} active={product} onChange={pick} />
|
||||
<div className="flex flex-wrap items-center gap-2 text-sm">
|
||||
<span className="text-slate-500">Select:</span>
|
||||
<button type="button" className="btn-secondary px-2 py-1 text-xs" onClick={() => setChosen(deployments.map(d => d.id))}>All live {name} ({deployments.length})</button>
|
||||
@@ -115,7 +115,7 @@ export default function UpdatesPage() {
|
||||
<div>
|
||||
<label className="label" htmlFor="b-v">{name} release</label>
|
||||
<ReleaseSelect key={product} id="b-v" releases={ownReleases} value={form.version} onChange={version => setForm({ ...form, version })} />
|
||||
{product === "events" && <p className="mt-1 text-xs text-slate-500">Each church's Accounts stays on its version, unless this release needs a newer one: then it's updated first in the same deploy, or installed first if the church has none. The confirmation lists what happens.</p>}
|
||||
{product !== "accounts" && <p className="mt-1 text-xs text-slate-500">Each church's Accounts stays on its version, unless this release needs a newer one: then it's updated first in the same deploy, or installed first if the church has none. The confirmation lists what happens.</p>}
|
||||
</div>
|
||||
{form.emergency && form.asap
|
||||
? <div><span className="label">When</span><p className="mt-2 text-sm">As soon as possible: the agent starts within a minute. They run one at a time.</p></div>
|
||||
|
||||
Reference in New Issue
Block a user