mirror of
https://18126008609:longquanjian123@gitee.com/feigong123/aurask.git
synced 2026-04-19 15:00:35 +00:00
139 lines
3.9 KiB
HTML
139 lines
3.9 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Aurask</title>
|
|
<style>
|
|
:root {
|
|
color-scheme: dark;
|
|
font-family: Inter, "Segoe UI", sans-serif;
|
|
background: #0b1020;
|
|
color: #e5e7eb;
|
|
}
|
|
body {
|
|
margin: 0;
|
|
min-height: 100vh;
|
|
display: grid;
|
|
place-items: center;
|
|
background: radial-gradient(circle at top, #1f3a8a 0, #0b1020 45%);
|
|
}
|
|
main {
|
|
width: min(920px, calc(100vw - 32px));
|
|
padding: 40px;
|
|
border-radius: 24px;
|
|
background: rgba(15, 23, 42, 0.86);
|
|
box-shadow: 0 30px 80px rgba(15, 23, 42, 0.45);
|
|
border: 1px solid rgba(148, 163, 184, 0.18);
|
|
}
|
|
h1 {
|
|
margin: 0 0 12px;
|
|
font-size: 44px;
|
|
}
|
|
p {
|
|
margin: 0 0 16px;
|
|
line-height: 1.7;
|
|
color: #cbd5e1;
|
|
}
|
|
.grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
gap: 16px;
|
|
margin: 28px 0;
|
|
}
|
|
.card {
|
|
padding: 18px;
|
|
border-radius: 18px;
|
|
background: rgba(30, 41, 59, 0.9);
|
|
border: 1px solid rgba(148, 163, 184, 0.14);
|
|
}
|
|
.label {
|
|
font-size: 12px;
|
|
letter-spacing: 0.08em;
|
|
text-transform: uppercase;
|
|
color: #93c5fd;
|
|
margin-bottom: 10px;
|
|
}
|
|
code {
|
|
color: #fde68a;
|
|
word-break: break-all;
|
|
}
|
|
a {
|
|
color: #93c5fd;
|
|
text-decoration: none;
|
|
}
|
|
a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.status {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px 14px;
|
|
border-radius: 999px;
|
|
background: rgba(30, 41, 59, 0.9);
|
|
border: 1px solid rgba(148, 163, 184, 0.18);
|
|
margin-top: 8px;
|
|
}
|
|
.dot {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 999px;
|
|
background: #f59e0b;
|
|
box-shadow: 0 0 12px rgba(245, 158, 11, 0.65);
|
|
}
|
|
.dot.ok {
|
|
background: #22c55e;
|
|
box-shadow: 0 0 12px rgba(34, 197, 94, 0.65);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<main>
|
|
<h1>Aurask</h1>
|
|
<p>当前站点提供 Aurask MVP 网关入口与部署说明页。生产可用接口位于同域名下的 <code>/api</code> 前缀。</p>
|
|
<div class="status">
|
|
<span class="dot" id="health-dot"></span>
|
|
<span id="health-text">正在检查 API 健康状态...</span>
|
|
</div>
|
|
<div class="grid">
|
|
<section class="card">
|
|
<div class="label">Health</div>
|
|
<div><a href="/api/health" target="_blank" rel="noreferrer">/api/health</a></div>
|
|
</section>
|
|
<section class="card">
|
|
<div class="label">Plans</div>
|
|
<div><a href="/api/plans" target="_blank" rel="noreferrer">/api/plans</a></div>
|
|
</section>
|
|
<section class="card">
|
|
<div class="label">Bootstrap</div>
|
|
<div><code>POST /api/demo/bootstrap</code></div>
|
|
</section>
|
|
<section class="card">
|
|
<div class="label">Source</div>
|
|
<div><a href="https://git.mydevcloud.love/devcloud-admin/aurask.git" target="_blank" rel="noreferrer">aurask.git</a></div>
|
|
</section>
|
|
</div>
|
|
<p>鉴权接口使用 <code>Authorization: Bearer <api_key></code>。当前前台页面为轻量入口页,后端能力直接来自 Aurask `master` 分支的 MVP 网关。</p>
|
|
</main>
|
|
<script>
|
|
async function checkHealth() {
|
|
const dot = document.getElementById("health-dot");
|
|
const text = document.getElementById("health-text");
|
|
try {
|
|
const response = await fetch("/api/health", { cache: "no-store" });
|
|
if (!response.ok) {
|
|
throw new Error("HTTP " + response.status);
|
|
}
|
|
const payload = await response.json();
|
|
dot.classList.add("ok");
|
|
text.textContent = "API 正常: " + (payload.service || "aurask");
|
|
} catch (error) {
|
|
text.textContent = "API 检查失败: " + error.message;
|
|
}
|
|
}
|
|
checkHealth();
|
|
</script>
|
|
</body>
|
|
</html>
|