split timings, remove useless kvs

This commit is contained in:
2026-04-10 07:10:11 +04:00
parent a6d0596c9e
commit 8c3cc3739a
9 changed files with 46 additions and 58 deletions
+1 -16
View File
@@ -17,14 +17,12 @@ export interface StatusPageRow {
index_search: boolean;
show_powered_by: boolean;
show_response_time:boolean;
show_cert_expiry: boolean;
bar_frequency: BucketType;
bar_count: number;
custom_domain: string | null;
custom_css: string | null;
footer_text: string | null;
og_image_url: string | null;
analytics_html: string | null;
auto_refresh_s: number;
}
@@ -498,11 +496,6 @@ export async function loadMonitorDetail(slug: string, monitorId: string): Promis
// The shape we actually expose to anonymous visitors. Computed by stripping
// internal IDs and any field a public consumer doesn't need from the row
// types - see redactPageForPublic / redactGroupsAndMonitors below.
//
// custom_css and analytics_html are kept here even though they're noisy to
// JSON consumers, because the HTML render reads from this same object - and
// they're already publicly visible in the rendered HTML, so dropping them
// from JSON wouldn't actually add any privacy.
export interface PublicPageView {
slug: string;
title: string;
@@ -511,13 +504,9 @@ export interface PublicPageView {
index_search: boolean;
show_powered_by: boolean;
show_response_time: boolean;
show_cert_expiry: boolean;
bar_frequency: BucketType;
bar_count: number;
custom_css: string | null;
footer_text: string | null;
og_image_url: string | null;
analytics_html: string | null;
auto_refresh_s: number;
has_password: boolean;
}
@@ -549,13 +538,9 @@ function redactPageForPublic(p: StatusPageRow): PublicPageView {
index_search: p.index_search,
show_powered_by: p.show_powered_by,
show_response_time: p.show_response_time,
show_cert_expiry: p.show_cert_expiry,
bar_frequency: p.bar_frequency,
bar_count: p.bar_count,
custom_css: p.custom_css,
footer_text: p.footer_text,
og_image_url: p.og_image_url,
analytics_html: p.analytics_html,
auto_refresh_s: p.auto_refresh_s,
has_password: !!p.password_hash,
};
+8
View File
@@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<rect width="32" height="32" rx="6" fill="#0a0a0a"/>
<text x="3" y="23" font-family="system-ui, sans-serif" font-weight="700" font-size="18" fill="#e5e7eb">P</text>
<text x="14" y="23" font-family="system-ui, sans-serif" font-weight="700" font-size="18" fill="#3b82f6">Q</text>
<circle cx="26" cy="6" r="3" fill="#22c55e">
<animate attributeName="opacity" values="1;0.4;1" dur="2s" repeatCount="indefinite"/>
</circle>
</svg>

After

Width:  |  Height:  |  Size: 501 B

+1 -2
View File
@@ -105,12 +105,11 @@
<% if (!page.index_search) { %><meta name="robots" content="noindex,nofollow"><% } %>
<meta property="og:title" content="<%= page.title %>">
<% if (page.description) { %><meta property="og:description" content="<%= page.description %>"><% } %>
<% if (page.og_image_url) { %><meta property="og:image" content="<%= page.og_image_url %>"><% } %>
<link rel="icon" href="/_static/favicon.svg" type="image/svg+xml">
<link rel="alternate" type="application/rss+xml" title="<%= page.title %> incidents" href="/<%= page.slug %>.rss">
<link rel="manifest" href="/<%= page.slug %>/manifest.json">
<link rel="stylesheet" href="/_static/app.css?v=<%= it.appCssHash %>">
<% if (page.custom_css) { %><style><%~ page.custom_css %></style><% } %>
<% if (page.analytics_html) { %><%~ page.analytics_html %><% } %>
</head>
<body>
<main>