A year of history, one chart, and a read API with personal tokens

History: server load, memory and disks are also kept as hourly (four months) and
daily (over two years) averages with lowest and highest; endpoint answers as
hourly (four months) beside the daily figures. Charts ask for 24 hours to a year
and are drawn from whichever is fine enough. A disk that two weeks call flat is
looked at again over ninety days for the forecast. Built once from what is kept.

One chart: TimeChart replaces the sparkline and the multi-line chart: hover and
arrow-key readout, a lowest/highest band, gaps shown as gaps, the same ranges
everywhere and the choice remembered. Used for server trends, comparing servers,
a check's availability and answer times (Endpoints > History) and a server's
availability.

Read API: /api/v1 (servers, metrics, alerts, incidents, inventory, network,
endpoints and their history, maintenance) with personal read-only tokens made
under the user menu: shown once, hashed, 30/90/365 days or none, ten at most,
removed with their owner. GET only. Documented in API.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-20 20:22:58 +02:00
1 parent 5e26e77340
commit 68b41b5586
47 files changed
+12360 -247

No files matched your search

+6
View File
@@ -16,6 +16,7 @@ import { readableError } from "../utils/errors";
import { toast } from "../utils/toast";
import { EmptyRow } from "../components/EmptyState";
import EndpointSuggestions from "../components/EndpointSuggestions";
import EndpointHistory from "../components/EndpointHistory";
const KIND_LABELS: Record<EndpointKind, string> = { http: "Web address", tcp: "Port", tls: "Certificate" };
const KIND_HINTS: Record<EndpointKind, string> = {
@@ -128,6 +129,7 @@ export default function Endpoints({ user }: { user: CurrentUser }) {
const [draft, setDraft] = useState<Draft | null>(null);
const [busy, setBusy] = useState(false);
const [asking, setAsking] = useState<number | null>(null);
const [historyFor, setHistoryFor] = useState<{ id: number; name: string } | null>(null);
function load() {
api.endpoints
@@ -438,6 +440,9 @@ export default function Endpoints({ user }: { user: CurrentUser }) {
<div>
<Ticks recent={c.stats?.recent ?? []} />
</div>
<button type="button" className="btn btn-link btn-sm p-0" onClick={() => setHistoryFor({ id: c.id, name: c.name })}>
History…
</button>
</td>
<td className="stack-label" data-label="Certificate">
{c.certDays === null ? (
@@ -488,6 +493,7 @@ export default function Endpoints({ user }: { user: CurrentUser }) {
</div>
<Pagination page={page.page} pageCount={page.pageCount} totalCount={page.totalCount} onPageChange={page.setPage} />
</div>
{historyFor && <EndpointHistory checkId={historyFor.id} name={historyFor.name} onClose={() => setHistoryFor(null)} />}
</>
);
}