Adds /api/health, ntfy notify on config save, /admin/analytics charts, and deploy smoke for miniprogram config/API. Co-authored-by: Cursor <cursoragent@cursor.com>
70 lines
2.5 KiB
TypeScript
70 lines
2.5 KiB
TypeScript
"use client";
|
||
|
||
import Link from "next/link";
|
||
import styles from "../admin.module.css";
|
||
|
||
const OPS = [
|
||
{ emoji: "📊", name: "Umami", href: "https://umami.nomadro.cn", note: "行为分析" },
|
||
{ emoji: "💓", name: "Uptime-Kuma", href: "https://uptimekuma.nomadro.cn", note: "可用性" },
|
||
{ emoji: "🔔", name: "ntfy", href: "https://ntfy.nomadro.cn", note: "即时告警" },
|
||
{ emoji: "🗄️", name: "PocketBase", href: "https://pocketbase.nomadro.cn", note: "主库" },
|
||
{ emoji: "📦", name: "S3 / SeaweedFS", href: "https://s3.nomadro.cn", note: "对象存储" },
|
||
{ emoji: "🔧", name: "Git", href: "https://git.nomadro.cn", note: "源码" },
|
||
{ emoji: "🩺", name: "Health 锚点", href: "/api/health", note: "Kuma 探针" },
|
||
{ emoji: "📈", name: "后台统计", href: "/admin/analytics", note: "图表 / ntfy" },
|
||
] as const;
|
||
|
||
export default function AdminOpsPage() {
|
||
return (
|
||
<>
|
||
<h1 className={styles.pageTitle} id="top">
|
||
🛠️ 运维
|
||
</h1>
|
||
<p className={styles.pageLead}>
|
||
Caddy / Docker / Umami / Uptime-Kuma / ntfy / SeaweedFS / webhook。备份见{" "}
|
||
<code>deploy/backup</code>。
|
||
</p>
|
||
<nav className={styles.anchorNav} aria-label="运维锚点">
|
||
<a href="#stack">栈</a>
|
||
<a href="#kuma">监控</a>
|
||
<Link href="/admin/analytics#ntfy">ntfy</Link>
|
||
</nav>
|
||
<div className={styles.grid2} id="stack">
|
||
{OPS.map((o) => (
|
||
<a
|
||
key={o.name}
|
||
className={styles.opsCard}
|
||
href={o.href}
|
||
target={o.href.startsWith("http") ? "_blank" : undefined}
|
||
rel="noreferrer"
|
||
>
|
||
<span aria-hidden>{o.emoji}</span>
|
||
<strong>{o.name}</strong>
|
||
<em>{o.note}</em>
|
||
</a>
|
||
))}
|
||
</div>
|
||
<div className={styles.panel} id="kuma" style={{ marginTop: 16 }}>
|
||
<h3>Uptime-Kuma 建议探针</h3>
|
||
<ul className={styles.listPlain}>
|
||
<li>
|
||
<code>https://nomadro.cn/api/health</code> — 门户
|
||
</li>
|
||
<li>
|
||
<code>https://nomadro.cn/api/config</code> — 远程配置(小程序依赖)
|
||
</li>
|
||
<li>
|
||
<code>https://api.nomadro.cn</code> — FastAPI(小程序支付/鉴权)
|
||
</li>
|
||
<li>
|
||
<code>https://umami.nomadro.cn/api/heartbeat</code>
|
||
</li>
|
||
<li>
|
||
<code>https://ntfy.nomadro.cn/v1/health</code>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</>
|
||
);
|
||
}
|