Vendorize Lovart dashboard shell

这个提交包含在:
hao
2026-03-17 01:22:36 -07:00
父节点 39a6eb6e19
当前提交 300c840509
修改 90 个文件,包含 4046 行新增2412 行删除

查看文件

@@ -0,0 +1,18 @@
{
"template_id": "lovart-authorized-lab-dashboard",
"source_url": "https://assets-persist.lovart.ai/agent_images/464011bb-fbbc-4bd4-98f8-90897dd43612.html",
"downloaded_at": "2026-03-17T07:56:29Z",
"original_filename": "464011bb-fbbc-4bd4-98f8-90897dd43612.html",
"vendor_source_path": "scripts/lab/dashboard_templates/lovart/vendor/464011bb-fbbc-4bd4-98f8-90897dd43612.html",
"runtime_template": {
"index": "scripts/lab/dashboard_templates/lovart/index.html",
"styles": "scripts/lab/dashboard_templates/lovart/assets/styles.css",
"app": "scripts/lab/dashboard_templates/lovart/assets/app.js",
"icons": "scripts/lab/dashboard_templates/lovart/assets/icons.svg"
},
"notes": [
"The remote Lovart HTML is tracked for provenance only and is not used at runtime.",
"Runtime assets are localized into repository-managed templates and generated output.",
"External fonts and icon CDNs are intentionally removed from the generated dashboard."
]
}

查看文件

@@ -0,0 +1,74 @@
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
<symbol id="spark" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M12 3l1.7 5.3L19 10l-5.3 1.7L12 17l-1.7-5.3L5 10l5.3-1.7L12 3z"/>
</symbol>
<symbol id="refresh" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M20 11a8 8 0 10-2.3 5.7M20 5v6h-6"/>
</symbol>
<symbol id="docs" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M7 4.5h9a2 2 0 012 2V19a1 1 0 01-1.5.9L12 17.5l-4.5 2.4A1 1 0 016 19V6.5a2 2 0 012-2z"/>
</symbol>
<symbol id="legacy" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M12 8v4l3 2m5-2a8 8 0 11-8-8"/>
</symbol>
<symbol id="source" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M8 9l-4 3 4 3m8-6l4 3-4 3m-6 5l4-16"/>
</symbol>
<symbol id="search" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M11 18a7 7 0 100-14 7 7 0 000 14zm8 3l-4.2-4.2"/>
</symbol>
<symbol id="filter" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M4 6h16M7 12h10m-7 6h4"/>
</symbol>
<symbol id="systems" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M4 5h16v10H4zm3 14h10"/>
</symbol>
<symbol id="failure" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M12 9v4m0 4h.01M10.3 4.9l-7 12.1A1 1 0 004.1 18h15.8a1 1 0 00.87-1.5l-7-12.1a1 1 0 00-1.74 0z"/>
</symbol>
<symbol id="queue" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M8 6h12M8 12h12M8 18h12M4 6h.01M4 12h.01M4 18h.01"/>
</symbol>
<symbol id="timeline" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M6 6h.01M6 12h.01M6 18h.01M10 6h8M10 12h8M10 18h8"/>
</symbol>
<symbol id="reasoning" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M9 18h6m-9-4h12m-9-4h6M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"/>
</symbol>
<symbol id="evidence" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M5 4h10l4 4v12H5zM14 4v4h4"/>
</symbol>
<symbol id="logs" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M4 6h16M4 12h10M4 18h7"/>
</symbol>
<symbol id="sources" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M10 13a5 5 0 017.1 0l.9.9a5 5 0 01-7.1 7.1l-.9-.9M14 11a5 5 0 00-7.1 0l-.9.9A5 5 0 0013 19.1l.9-.9"/>
</symbol>
<symbol id="json" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M9 4c-2 0-3 1-3 3v2c0 1-.5 1.5-1.5 2C5.5 11.5 6 12 6 13v2c0 2 1 3 3 3m6-14c2 0 3 1 3 3v2c0 1 .5 1.5 1.5 2-1 .5-1.5 1-1.5 2v2c0 2-1 3-3 3"/>
</symbol>
<symbol id="report" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M6 20h12M8 16V8m4 8V4m4 12v-6"/>
</symbol>
<symbol id="markdown" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M4 6h16v12H4zM7 15V9l3 3 3-3v6m3-3h2m-1-2v4"/>
</symbol>
<symbol id="browser" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M4 7h16M7 4h10a3 3 0 013 3v10a3 3 0 01-3 3H7a3 3 0 01-3-3V7a3 3 0 013-3z"/>
</symbol>
<symbol id="sync" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="8" fill="currentColor"/>
</symbol>
<symbol id="chevron" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M6 9l6 6 6-6"/>
</symbol>
<symbol id="link" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M10 14l4-4m-7 7l-1.6 1.6a3 3 0 104.2 4.2L11 21m2-18l1.4-1.4a3 3 0 114.2 4.2L17 7"/>
</symbol>
<symbol id="shield" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M12 3l7 3v5c0 4.5-2.9 8.3-7 10-4.1-1.7-7-5.5-7-10V6l7-3z"/>
</symbol>
<symbol id="playbook" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M5 4h11l3 3v13H5zM14 4v3h3M8 11h8M8 15h5"/>
</symbol>
</svg>

之后

宽度:  |  高度:  |  大小: 5.2 KiB

查看文件

@@ -0,0 +1,111 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Lovart 设计来源与本地化清单</title>
<style>
:root {
--bg: #08111f;
--panel: rgba(9, 18, 32, 0.9);
--border: rgba(137, 171, 214, 0.2);
--text: #f7fafc;
--muted: #9fb3ca;
--accent: #5eead4;
}
* { box-sizing: border-box; }
body {
margin: 0;
min-height: 100vh;
font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
color: var(--text);
background:
radial-gradient(circle at top left, rgba(94, 234, 212, 0.12), transparent 26%),
linear-gradient(160deg, #050c16 0%, #091526 50%, #10233d 100%);
}
main {
max-width: 1080px;
margin: 0 auto;
padding: 32px 20px 40px;
}
.panel {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 20px;
padding: 24px;
box-shadow: 0 24px 80px rgba(1, 7, 20, 0.45);
}
.actions {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 18px;
}
.chip {
display: inline-flex;
align-items: center;
gap: 8px;
border-radius: 999px;
border: 1px solid var(--border);
padding: 10px 14px;
color: var(--text);
background: rgba(255,255,255,0.05);
text-decoration: none;
}
.chip:hover { border-color: rgba(94, 234, 212, 0.42); }
h1 {
margin: 0 0 12px;
font-family: "IBM Plex Serif", Georgia, serif;
font-size: clamp(1.8rem, 4vw, 3rem);
line-height: 1.08;
}
.meta {
color: var(--muted);
margin-bottom: 18px;
}
pre {
margin: 0;
padding: 20px;
overflow: auto;
border-radius: 16px;
border: 1px solid rgba(137, 171, 214, 0.12);
background: rgba(2, 8, 22, 0.84);
color: #d6e5f5;
font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
font-size: 0.92rem;
line-height: 1.6;
white-space: pre-wrap;
}
</style>
</head>
<body>
<main>
<div class="panel">
<div class="actions">
<a class="chip" href="../index.html">Back to dashboard</a>
</div>
<h1>Lovart 设计来源与本地化清单</h1>
<div class="meta">Local vendor manifest for the Lovart-derived dashboard shell.</div>
<pre>{
&quot;template_id&quot;: &quot;lovart-authorized-lab-dashboard&quot;,
&quot;source_url&quot;: &quot;https://assets-persist.lovart.ai/agent_images/464011bb-fbbc-4bd4-98f8-90897dd43612.html&quot;,
&quot;downloaded_at&quot;: &quot;2026-03-17T07:56:29Z&quot;,
&quot;original_filename&quot;: &quot;464011bb-fbbc-4bd4-98f8-90897dd43612.html&quot;,
&quot;vendor_source_path&quot;: &quot;scripts/lab/dashboard_templates/lovart/vendor/464011bb-fbbc-4bd4-98f8-90897dd43612.html&quot;,
&quot;runtime_template&quot;: {
&quot;index&quot;: &quot;scripts/lab/dashboard_templates/lovart/index.html&quot;,
&quot;styles&quot;: &quot;scripts/lab/dashboard_templates/lovart/assets/styles.css&quot;,
&quot;app&quot;: &quot;scripts/lab/dashboard_templates/lovart/assets/app.js&quot;,
&quot;icons&quot;: &quot;scripts/lab/dashboard_templates/lovart/assets/icons.svg&quot;
},
&quot;notes&quot;: [
&quot;The remote Lovart HTML is tracked for provenance only and is not used at runtime.&quot;,
&quot;Runtime assets are localized into repository-managed templates and generated output.&quot;,
&quot;External fonts and icon CDNs are intentionally removed from the generated dashboard.&quot;
]
}
</pre>
</div>
</main>
</body>
</html>

查看文件

@@ -85,7 +85,7 @@
<a class="chip" href="../index.html">Back to dashboard</a>
</div>
<h1>本地前端工作台设计文档</h1>
<div class="meta">Dashboard-local mirror of the UI and interaction specification. | source: docs/frontend-dashboard-design.md</div>
<div class="meta">Dashboard-local mirror of the UI and interaction specification.</div>
<pre># 本地前端工作台设计文档
&gt; `LAB ONLY` | `AUTHORIZED TARGETS ONLY`
@@ -119,6 +119,8 @@
- 信息密度高,但必须可折叠、可筛选、可逐层展开
- 日志与原始 JSON 必须能直接预览
- 页面视觉应更生动,但不能牺牲扫描效率
- 默认路由采用正式新 UI,同时保留 `legacy` 回退入口
- 运行期不得依赖外部 HTML、字体 CDN 或图标 CDN
## 3. 信息架构
@@ -376,7 +378,22 @@ flowchart LR
前端不直接写这些数据,只读取并展示。
## 10. 落地约束
## 10. 路由与文档地址
- `/index.html`
- 默认正式入口,使用本地化 Lovart UI 外壳
- `/legacy/index.html`
- 旧版 dashboard 回退入口
- `/docs/project-features.html`
- 功能说明镜像页
- `/docs/frontend-dashboard-design.html`
- 设计说明镜像页
- `/docs/secure-code-index.html`
- secure-code 索引镜像页
- `/docs/design-source.html`
- Lovart vendor 来源和本地化说明
## 11. 落地约束
- 保持静态前端,不引入长期运行后端
- 本地 `serve-dashboard` 即可查看
@@ -384,7 +401,7 @@ flowchart LR
- 不依赖第三方 CDN UI 库
- 优先使用原生 HTML/CSS/JS,可长期维护
## 11. 验收标准
## 12. 验收标准
页面完成后,应满足:

查看文件

@@ -85,7 +85,7 @@
<a class="chip" href="../index.html">Back to dashboard</a>
</div>
<h1>项目功能与特性总览</h1>
<div class="meta">Dashboard-local mirror of the repo feature guide. | source: docs/project-features.md</div>
<div class="meta">Dashboard-local mirror of the repo feature guide.</div>
<pre># 项目功能与特性总览
&gt; `LAB ONLY` | `AUTHORIZED TARGETS ONLY`
@@ -149,6 +149,9 @@
- `report.md`, `report.html`, `timeline.mmd`, `assets/`, `logs/`
- `08-threat-intel/generated/dashboard/`
- 静态前端工作台
- `/index.html` 为本地化 Lovart 正式 UI
- `/legacy/index.html` 为旧版工作台回退入口
- `/docs/*.html` 为本地可访问的说明与设计镜像页
- `07-framework-security/`
- 系统级 README、INDEX、案例页,自动显示本地实证状态
@@ -248,6 +251,15 @@ python3 /Users/x/websafe/scripts/lab/main.py serve-dashboard --port 8734
详细设计见:
- [本地前端工作台设计文档](/Users/x/websafe/docs/frontend-dashboard-design.md)
当前地址布局固定为:
- `/index.html`
- 默认新 UI,基于本地化 Lovart 视觉壳层,绑定真实 dashboard JSON
- `/legacy/index.html`
- 旧版工作台显式保留,用于快速回退和对照
- `/docs/design-source.html`
- 设计来源、vendor manifest 与本地化说明
</pre>
</div>
</main>

查看文件

@@ -85,7 +85,7 @@
<a class="chip" href="../index.html">Back to dashboard</a>
</div>
<h1>安全编码修复库索引</h1>
<div class="meta">Dashboard-local mirror of the secure-code library index. | source: 05-defense/secure-code/INDEX.md</div>
<div class="meta">Dashboard-local mirror of the secure-code library index.</div>
<pre># 安全编码修复库
&gt; `LAB ONLY` | 修复主题用于把实验发现映射回代码整改,不代表默认生产基线。

查看文件

@@ -1,81 +1,168 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>websafe authorized lab dashboard</title>
<title>Authorized Lab Dashboard</title>
<link rel="stylesheet" href="./assets/styles.css">
</head>
<body>
<div class="grid-bg" aria-hidden="true"></div>
<div class="dashboard-shell">
<header class="hero">
<div class="hero-grid">
<div>
<div class="eyebrow">Authorized Lab Dashboard</div>
<div class="hero-glow hero-glow-left" aria-hidden="true"></div>
<div class="hero-glow hero-glow-right" aria-hidden="true"></div>
<div class="hero-top">
<div class="hero-copy">
<div class="hero-eyebrow">
<svg class="icon"><use href="./assets/icons.svg#spark"></use></svg>
<span>Authorized Lab Dashboard</span>
</div>
<h1>本地攻防实证工作台</h1>
<p>面向授权实验场景的本地静态前端。聚合 advisory、run bundle、日志、浏览器证据、失败原因、利用思路与源头信息,并支持可折叠细节与自动刷新。</p>
<div class="hero-actions">
<button id="refreshDashboard" class="chip" type="button">Refresh Dashboard</button>
<label class="ghost-chip"><input id="autoRefresh" type="checkbox" checked> Auto Refresh</label>
<a class="ghost-chip" href="./summary.json" target="_blank" rel="noreferrer">Open Summary JSON</a>
<a class="ghost-chip" href="./docs/project-features.html" target="_blank" rel="noreferrer">Open Feature Docs</a>
</div>
<p>
Lovart 设计外壳已本地化并接入真实 run bundle 数据。页面只面向授权实验资产,
聚合 advisory、timeline、evidence、logs、sources、raw JSON 与失败原因。
</p>
</div>
<div>
<div class="panel-header">
<h2>Sync State</h2>
<div id="syncState" class="sync-indicator"><span class="dot"></span><strong>Booting</strong><span>Loading generated JSON</span></div>
<div class="hero-actions">
<button id="refreshDashboard" class="button button-primary" type="button">
<svg class="icon"><use href="./assets/icons.svg#refresh"></use></svg>
<span>Refresh</span>
</button>
<label class="toggle-card">
<span class="toggle-label">Auto Refresh</span>
<span class="toggle-switch">
<input id="autoRefresh" type="checkbox" checked>
<span class="toggle-slider"></span>
</span>
</label>
<div id="syncState" class="sync-state">
<svg class="icon icon-sync"><use href="./assets/icons.svg#sync"></use></svg>
<div>
<strong>Booting</strong>
<span>Loading generated JSON</span>
</div>
</div>
<div class="hero-links">
<a class="button button-secondary" href="./docs/project-features.html" target="_blank" rel="noreferrer">
<svg class="icon"><use href="./assets/icons.svg#docs"></use></svg>
<span>Feature Docs</span>
</a>
<a class="button button-secondary" href="./docs/frontend-dashboard-design.html" target="_blank" rel="noreferrer">
<svg class="icon"><use href="./assets/icons.svg#playbook"></use></svg>
<span>UI Spec</span>
</a>
<a class="button button-secondary" href="./legacy/index.html" target="_blank" rel="noreferrer">
<svg class="icon"><use href="./assets/icons.svg#legacy"></use></svg>
<span>Legacy UI</span>
</a>
</div>
<div id="metrics" class="hero-meta"></div>
</div>
</div>
<div id="metricCards" class="metrics-row"></div>
</header>
<div class="workspace">
<main class="main-container">
<aside class="sidebar">
<section class="glass-panel">
<div class="panel-header">
<h2>Filters</h2>
<span id="runCount" class="tag">0 shown</span>
<section class="sidebar-section">
<div class="section-header">
<span>
<svg class="icon"><use href="./assets/icons.svg#filter"></use></svg>
Filters
</span>
<span id="runCount" class="section-badge">0 shown</span>
</div>
<div class="filters">
<label>Search
<input id="searchInput" placeholder="Search run id, advisory, title">
<div class="filter-group">
<label class="field">
<span>Search</span>
<div class="search-box">
<svg class="icon"><use href="./assets/icons.svg#search"></use></svg>
<input id="searchInput" type="text" placeholder="Search run id, advisory, title">
</div>
</label>
<label>System
<select id="systemFilter"><option value="">All systems</option></select>
<label class="field">
<span>System</span>
<select id="systemFilter" class="filter-select">
<option value="">All systems</option>
</select>
</label>
<label>Status
<select id="statusFilter"><option value="">All statuses</option></select>
<label class="field">
<span>Status</span>
<select id="statusFilter" class="filter-select">
<option value="">All statuses</option>
</select>
</label>
<label>Profile
<select id="familyFilter"><option value="">All profiles</option></select>
<label class="field">
<span>Profile</span>
<select id="profileFilter" class="filter-select">
<option value="">All profiles</option>
</select>
</label>
</div>
</section>
<section class="glass-panel">
<div class="panel-header"><h2>Systems</h2></div>
<div id="systemCoverage" class="system-grid"></div>
<section class="sidebar-section">
<div class="section-header">
<span>
<svg class="icon"><use href="./assets/icons.svg#systems"></use></svg>
Systems
</span>
</div>
<div id="systemStats" class="system-stats"></div>
</section>
<section class="glass-panel">
<div class="panel-header"><h2>Recent Failures</h2></div>
<div id="failureFeed" class="failure-feed"></div>
<section class="sidebar-section">
<div class="section-header">
<span>
<svg class="icon"><use href="./assets/icons.svg#failure"></use></svg>
Recent Failures
</span>
</div>
<div id="recentFailures" class="failure-list"></div>
</section>
<section class="glass-panel">
<div class="panel-header"><h2>Run Queue View</h2></div>
<div id="runList" class="run-list"></div>
<section class="sidebar-section sidebar-section-fill">
<div class="section-header">
<span>
<svg class="icon"><use href="./assets/icons.svg#queue"></use></svg>
Run Queue
</span>
</div>
<div id="runQueue" class="run-list"></div>
</section>
</aside>
<main id="detailRoot" class="detail-view">
<div class="glass-panel empty-state">Select a run to inspect full details.</div>
</main>
</div>
<section id="detailWorkspace" class="workspace">
<div class="workspace-empty">
<svg class="icon icon-xl"><use href="./assets/icons.svg#shield"></use></svg>
<h2>Select a run</h2>
<p>Pick a run from the left queue to inspect timeline, evidence, logs, sources and raw JSON.</p>
</div>
</section>
</main>
<footer class="dashboard-footer">
<div class="footer-left">
<span class="footer-note">
<svg class="icon"><use href="./assets/icons.svg#source"></use></svg>
UI shell is vendorized from a local Lovart source copy, not an online runtime dependency.
</span>
</div>
<div class="footer-links">
<a href="./docs/design-source.html" target="_blank" rel="noreferrer">Design source</a>
<a href="./assets/design-source.json" target="_blank" rel="noreferrer">Manifest JSON</a>
<a href="./summary.json" target="_blank" rel="noreferrer">Summary JSON</a>
</div>
</footer>
</div>
<script src="./assets/app.js"></script>
</body>
</html>

查看文件

@@ -0,0 +1 @@
../advisories.json

查看文件

@@ -0,0 +1,573 @@
const state = {
summary: null,
runs: [],
systems: [],
advisories: {},
profiles: {},
selectedRunId: null,
selectedArtifact: null,
filters: { search: "", system: "", status: "", family: "" },
autoRefresh: true,
refreshMs: 5000,
refreshHandle: null,
};
const $ = (id) => document.getElementById(id);
const statusClass = (status) => `status-pill ${({
"blocked-artifact": "status-blocked-artifact",
"blocked-destructive": "status-blocked-destructive",
"triage-manual": "status-triage-manual",
"verified-real": "status-verified-real",
"verified-synthetic": "status-verified-synthetic",
"suspected": "status-suspected",
"completed": "status-verified-real",
"failed": "status-blocked-artifact",
"skipped": "status-triage-manual"
})[status] || "status-default"}`;
function escapeHtml(value) {
return String(value ?? "")
.replaceAll("&", "&amp;")
.replaceAll("<", "&lt;")
.replaceAll(">", "&gt;")
.replaceAll('"', "&quot;");
}
function timeAgo(value) {
if (!value) return "-";
const diff = Date.now() - new Date(value).getTime();
if (Number.isNaN(diff)) return value;
const seconds = Math.floor(diff / 1000);
if (seconds < 60) return `${seconds}s ago`;
const minutes = Math.floor(seconds / 60);
if (minutes < 60) return `${minutes}m ago`;
const hours = Math.floor(minutes / 60);
if (hours < 24) return `${hours}h ago`;
const days = Math.floor(hours / 24);
return `${days}d ago`;
}
async function fetchJson(url) {
const response = await fetch(`${url}?t=${Date.now()}`, { cache: "no-store" });
if (!response.ok) {
throw new Error(`${url} -> ${response.status}`);
}
return response.json();
}
async function loadData(preserveSelection = true) {
$("syncState").innerHTML = `<span class="dot"></span><strong>Refreshing</strong><span>${new Date().toLocaleTimeString()}</span>`;
const previousRun = state.selectedRunId;
try {
const [summary, runs, systems, advisories, profiles] = await Promise.all([
fetchJson("./summary.json"),
fetchJson("./runs.json"),
fetchJson("./systems.json"),
fetchJson("./advisories.json"),
fetchJson("./profiles.json"),
]);
state.summary = summary;
state.runs = runs;
state.systems = systems;
state.advisories = advisories;
state.profiles = profiles;
hydrateFilterOptions();
const hashRun = location.hash.startsWith("#run=") ? location.hash.replace("#run=", "") : null;
const selectedCandidate = preserveSelection ? (hashRun || previousRun) : hashRun;
if (selectedCandidate && runs.some((item) => item.run_id === selectedCandidate)) {
state.selectedRunId = selectedCandidate;
} else {
state.selectedRunId = runs[0]?.run_id || null;
}
renderDashboard();
$("syncState").innerHTML = `<span class="dot"></span><strong>Live</strong><span>${summary.generated_at || new Date().toISOString()}</span>`;
} catch (error) {
$("syncState").innerHTML = `<span class="dot"></span><strong>Load Failed</strong><span>${escapeHtml(error.message)}</span>`;
$("runList").innerHTML = `<div class="empty-state">Dashboard load failed: ${escapeHtml(error.message)}</div>`;
$("detailRoot").innerHTML = `<div class="glass-panel empty-state">Unable to load dashboard data. Check generated JSON and local static server state.</div>`;
}
}
function filteredRuns() {
return state.runs.filter((item) => {
if (state.filters.system && item.system_id !== state.filters.system) return false;
if (state.filters.status && item.verification_status !== state.filters.status) return false;
if (state.filters.family && item.repro_profile_id !== state.filters.family) return false;
if (!state.filters.search) return true;
const advisoryTitle = item.advisory_meta?.title || "";
const haystack = [item.run_id, item.advisory_id, item.system_id, item.repro_profile_id, advisoryTitle]
.join(" ")
.toLowerCase();
return haystack.includes(state.filters.search);
});
}
function renderMetrics() {
const metrics = [
{ label: "Advisories", value: state.summary?.advisory_count ?? 0 },
{ label: "Run Bundles", value: state.summary?.run_count ?? 0 },
...Object.entries(state.summary?.statuses || {}).map(([label, value]) => ({ label, value })),
];
$("metrics").innerHTML = metrics
.map((item) => `<article class="meta-card"><strong>${escapeHtml(item.label)}</strong><span>${escapeHtml(item.value)}</span></article>`)
.join("");
}
function renderSystemCoverage() {
$("systemCoverage").innerHTML = state.systems
.map((system) => {
const total = Math.max(system.total || 0, 1);
const verified = (system.verified_real || 0) + (system.verified_synthetic || 0);
const fill = Math.round((verified / total) * 100);
return `
<div class="system-card">
<div class="run-card-top">
<strong>${escapeHtml(system.display_name || system.system_id)}</strong>
<span class="tag">${escapeHtml(system.browser_present || 0)}/${escapeHtml(system.browser_required || 0)} browser</span>
</div>
<div class="mini-muted">${escapeHtml(system.system_id)} · latest ${escapeHtml(system.latest_update || "-")}</div>
<div class="tag-row" style="margin-top:10px;">
<span class="tag">real ${escapeHtml(system.verified_real || 0)}</span>
<span class="tag">synthetic ${escapeHtml(system.verified_synthetic || 0)}</span>
<span class="tag">blocked ${escapeHtml(system.blocked || 0)}</span>
<span class="tag">manual ${escapeHtml(system.manual || 0)}</span>
</div>
<div class="meter"><span style="--fill:${fill}%"></span></div>
</div>
`;
})
.join("");
}
function renderFailures() {
const failures = state.summary?.recent_failures || [];
$("failureFeed").innerHTML = failures.length
? failures
.map((item) => `
<div class="failure-item">
<div class="run-card-top">
<strong>${escapeHtml(item.run_id)}</strong>
<span class="${statusClass(item.status)}">${escapeHtml(item.status)}</span>
</div>
<div class="mini-muted" style="margin-top:8px;">${escapeHtml(item.title || item.advisory_id)}</div>
<div class="mini-muted" style="margin-top:8px;">${escapeHtml(item.blocked_reason || "-")}</div>
</div>
`)
.join("")
: `<div class="empty-state">No recent blockers.</div>`;
}
function renderRunList() {
const filtered = filteredRuns();
$("runCount").textContent = `${filtered.length} shown`;
$("runList").innerHTML = filtered.length
? filtered
.map((item) => {
const active = item.run_id === state.selectedRunId ? "is-active" : "";
const title = item.advisory_meta?.title || item.advisory_id;
const reasoning = item.reasoning_lines?.[0] || item.blocked_reason || "";
const browserLabel = item.browser_evidence?.present ? "ready" : (item.browser_evidence?.required ? "required" : "n/a");
return `
<button class="run-card ${active}" data-run-id="${escapeHtml(item.run_id)}">
<div class="run-card-top">
<code>${escapeHtml(item.run_id)}</code>
<span class="${statusClass(item.verification_status)}">${escapeHtml(item.verification_status)}</span>
</div>
<h4>${escapeHtml(title)}</h4>
<div class="mini-muted">${escapeHtml(item.system_id)} · ${escapeHtml(item.repro_profile_id)} · ${escapeHtml(timeAgo(item.finished_at))}</div>
<div class="tag-row" style="margin-top:10px;">
<span class="tag">timeline ${escapeHtml(item.timeline?.length || 0)}</span>
<span class="tag">artifacts ${escapeHtml((item.artifact_groups || []).reduce((sum, group) => sum + group.count, 0))}</span>
<span class="tag">browser ${escapeHtml(browserLabel)}</span>
</div>
<div class="mini-muted" style="margin-top:10px;">${escapeHtml(reasoning)}</div>
</button>
`;
})
.join("")
: `<div class="empty-state">No runs match the current filters.</div>`;
document.querySelectorAll("[data-run-id]").forEach((button) => {
button.addEventListener("click", () => {
state.selectedRunId = button.dataset.runId;
location.hash = `run=${state.selectedRunId}`;
renderRunList();
renderDetail();
});
});
}
function renderDashboard() {
renderMetrics();
renderSystemCoverage();
renderFailures();
renderRunList();
renderDetail();
}
function setFilterListeners() {
[["searchInput", "search"], ["systemFilter", "system"], ["statusFilter", "status"], ["familyFilter", "family"]].forEach(([id, key]) => {
$(id).addEventListener("input", (event) => {
state.filters[key] = String(event.target.value || "").trim().toLowerCase();
if (key !== "search") {
state.filters[key] = String(event.target.value || "");
}
renderRunList();
});
});
}
function hydrateFilterOptions() {
const distinct = (items) => [...new Set(items.filter(Boolean))].sort();
const patchOptions = (id, values) => {
const control = $(id);
const current = control.value;
control.innerHTML = control.dataset.base;
control.innerHTML += distinct(values).map((value) => `<option value="${escapeHtml(value)}">${escapeHtml(value)}</option>`).join("");
control.value = current;
};
patchOptions("systemFilter", state.runs.map((item) => item.system_id));
patchOptions("statusFilter", state.runs.map((item) => item.verification_status));
patchOptions("familyFilter", state.runs.map((item) => item.repro_profile_id));
}
function defaultArtifact(run) {
const preference = ["attack", "requests", "container", "browser", "baseline", "compose", "reports"];
for (const key of preference) {
const group = (run.artifact_groups || []).find((item) => item.key === key && item.items?.length);
if (!group) continue;
const preferredText = group.items.find((item) => item.kind === "text");
return preferredText || group.items[0];
}
return null;
}
function totalProgress(progress) {
const values = Object.values(progress || {}).map((value) => Number(value || 0));
return values.reduce((sum, value) => sum + value, 0);
}
function renderProgressStrip(progress) {
const total = totalProgress(progress);
if (!total) {
return `
<div class="progress-strip">
<div class="progress-bar"><div class="progress-segment progress-other" style="width:100%"></div></div>
<div class="mini-muted">No timeline progress recorded.</div>
</div>
`;
}
const order = [
["completed", "Completed", "progress-completed"],
["blocked", "Blocked", "progress-blocked"],
["failed", "Failed", "progress-failed"],
["skipped", "Skipped", "progress-skipped"],
["planned", "Planned", "progress-planned"],
["other", "Other", "progress-other"],
];
const segments = order
.filter(([key]) => Number(progress?.[key] || 0) > 0)
.map(([key, _label, klass]) => {
const count = Number(progress?.[key] || 0);
const pct = Math.max((count / total) * 100, 4);
return `<div class="progress-segment ${klass}" style="width:${pct}%"></div>`;
})
.join("");
const legend = order
.filter(([key]) => Number(progress?.[key] || 0) > 0)
.map(([key, label, klass]) => `
<span class="tag">
<span class="swatch ${klass}"></span>
${escapeHtml(label)} ${escapeHtml(progress?.[key] || 0)}
</span>
`)
.join("");
return `
<div class="progress-strip">
<div class="progress-bar">${segments}</div>
<div class="progress-legend">${legend}</div>
</div>
`;
}
function renderStageCards(run) {
const timeline = run.timeline || [];
if (!timeline.length) {
return `<div class="empty-state">No stage records available.</div>`;
}
return `
<div class="stage-grid">
${timeline.map((item) => `
<article class="stage-card">
<strong>${escapeHtml(item.step || "-")}</strong>
<div class="${statusClass(item.status || "default")}">${escapeHtml(item.status || "unknown")}</div>
<div class="mini-muted" style="margin-top:10px;">${escapeHtml(item.detail || "-")}</div>
<div class="mini-muted" style="margin-top:8px;">${escapeHtml(item.at || "-")}</div>
</article>
`).join("")}
</div>
`;
}
async function openArtifact(href, label, kind) {
state.selectedArtifact = { href, label, kind };
document.querySelectorAll(".artifact-button").forEach((button) => {
button.classList.toggle("is-active", button.dataset.href === href);
});
$("artifactLabel").textContent = label;
$("artifactOpen").href = href;
$("artifactMeta").textContent = href;
try {
if (kind === "image") {
$("artifactViewer").innerHTML = `<img src="${escapeHtml(href)}?t=${Date.now()}" alt="${escapeHtml(label)}">`;
return;
}
if (href.endsWith(".html")) {
$("artifactViewer").innerHTML = `<iframe src="${escapeHtml(href)}?t=${Date.now()}" style="width:100%;height:560px;border:0;background:white;"></iframe>`;
return;
}
const response = await fetch(`${href}?t=${Date.now()}`, { cache: "no-store" });
if (!response.ok) throw new Error(`${href} -> ${response.status}`);
const text = await response.text();
let formatted = text;
if (href.endsWith(".json")) {
try {
formatted = JSON.stringify(JSON.parse(text), null, 2);
} catch (_error) {
}
}
$("artifactViewer").innerHTML = `<pre>${escapeHtml(formatted)}</pre>`;
} catch (error) {
$("artifactViewer").innerHTML = `<pre>Artifact load failed: ${escapeHtml(error.message)}</pre>`;
}
}
function renderDetail() {
const run = state.runs.find((item) => item.run_id === state.selectedRunId);
if (!run) {
$("detailRoot").innerHTML = `<div class="glass-panel empty-state">Select a run to inspect full timeline, logs, sources, and reasoning.</div>`;
return;
}
const advisory = run.advisory_meta || {};
const profile = run.profile_meta || {};
const screenshotItems = (run.artifact_groups || [])
.find((group) => group.key === "browser")
?.items.filter((item) => item.kind === "image") || [];
$("detailRoot").innerHTML = `
<section class="glass-panel detail-hero">
<div class="eyebrow">Local Verification Workspace</div>
<div class="flex-row" style="margin-top:14px;">
<span class="${statusClass(run.verification_status)}">${escapeHtml(run.verification_status)}</span>
<div class="tag-row">
<span class="tag">${escapeHtml(run.system_id)}</span>
<span class="tag">${escapeHtml(run.repro_profile_id)}</span>
<span class="tag">${escapeHtml(run.artifact_mode)}</span>
<span class="tag">${escapeHtml(run.verification_mode)}</span>
<span class="tag">${escapeHtml(run.target_env || "local-docker")}</span>
</div>
</div>
<h2 class="detail-headline">${escapeHtml(advisory.title || run.advisory_id)}</h2>
<p class="mini-muted">${escapeHtml(advisory.summary || "No summary available.")}</p>
<div class="link-row" style="margin-top:18px;">
<a class="chip" href="${escapeHtml(run.dashboard_refs.report_html)}" target="_blank" rel="noreferrer">Open HTML report</a>
<a class="ghost-chip" href="${escapeHtml(run.dashboard_refs.report_md)}" target="_blank" rel="noreferrer">Open Markdown</a>
<a class="ghost-chip" href="${escapeHtml(run.dashboard_refs.bundle)}" target="_blank" rel="noreferrer">Open run JSON</a>
<a class="ghost-chip" href="./docs/frontend-dashboard-design.html" target="_blank" rel="noreferrer">Open UI spec</a>
</div>
<div class="stat-grid">
<article class="stat-card"><strong>Timeline Steps</strong><span>${escapeHtml(run.timeline?.length || 0)}</span></article>
<article class="stat-card"><strong>Artifacts</strong><span>${escapeHtml((run.artifact_groups || []).reduce((sum, group) => sum + group.count, 0))}</span></article>
<article class="stat-card"><strong>Browser</strong><span>${run.browser_evidence?.present ? "Ready" : (run.browser_evidence?.required ? "Required" : "Optional")}</span></article>
<article class="stat-card"><strong>Finished</strong><span>${escapeHtml(timeAgo(run.finished_at))}</span></article>
</div>
</section>
<div class="detail-grid">
<div class="stack">
<details class="glass-panel accordion" open>
<summary><span>Progress Timeline</span><span class="tag">${escapeHtml(run.timeline?.length || 0)} steps</span></summary>
<div class="accordion-content">
${renderProgressStrip(run.progress)}
${renderStageCards(run)}
<div class="timeline-list">
${(run.timeline || []).map((item) => `
<article class="timeline-item">
<div class="mini-muted">${escapeHtml(item.at || "-")}</div>
<div class="timeline-step">${escapeHtml(item.step || "-")}</div>
<div>
<div class="${statusClass(item.status || "default")}">${escapeHtml(item.status || "unknown")}</div>
<div class="mini-muted" style="margin-top:8px;">${escapeHtml(item.detail || "-")}</div>
</div>
</article>
`).join("") || `<div class="empty-state">No timeline items available.</div>`}
</div>
</div>
</details>
<details class="glass-panel accordion" open>
<summary><span>Attack Plan & Reasoning</span><span class="tag">${escapeHtml(profile.vuln_family || "unknown")}</span></summary>
<div class="accordion-content">
${run.blocked_reason ? `<div class="failure-callout"><strong>Failure reason</strong><div class="mini-muted" style="margin-top:8px;">${escapeHtml(run.blocked_reason)}</div></div>` : ""}
<div class="tag-row" style="margin:16px 0;">
<span class="tag">destructive risk ${escapeHtml(profile.destructive_risk || "-")}</span>
<span class="tag">cleanup ${escapeHtml(profile.cleanup_policy || "-")}</span>
<span class="tag">targets ${(profile.allowed_target_types || []).join(", ") || "-"}</span>
</div>
<div class="stack" style="gap:12px;">
${(run.reasoning_lines || []).map((line) => `<div class="system-card">${escapeHtml(line)}</div>`).join("")}
</div>
<div class="tag-row" style="margin-top:16px;">
${(profile.success_criteria || []).map((line) => `<span class="tag">${escapeHtml(line)}</span>`).join("")}
</div>
</div>
</details>
<details class="glass-panel accordion" open>
<summary><span>Evidence Explorer</span><span class="tag">${escapeHtml((run.artifact_groups || []).length)} groups</span></summary>
<div class="accordion-content">
${(run.artifact_groups || []).map((group) => `
<section class="artifact-group">
<h4>${escapeHtml(group.label)} · ${escapeHtml(group.count)}</h4>
<div class="artifact-row">
${group.items.map((item) => `
<button class="artifact-button" data-href="${escapeHtml(item.href)}" data-kind="${escapeHtml(item.kind)}" data-label="${escapeHtml(item.label)}">
<span>${escapeHtml(item.label)}</span>
<span class="mini-muted">${escapeHtml(item.kind)}</span>
</button>
`).join("")}
</div>
</section>
`).join("") || `<div class="empty-state">No artifacts linked for this run.</div>`}
${screenshotItems.length ? `
<div class="gallery" style="margin-top:12px;">
${screenshotItems.map((item) => `
<button class="gallery-item artifact-button" data-href="${escapeHtml(item.href)}" data-kind="${escapeHtml(item.kind)}" data-label="${escapeHtml(item.label)}">
<figure style="margin:0;">
<img src="${escapeHtml(item.href)}" alt="${escapeHtml(item.label)}">
<figcaption>${escapeHtml(item.label)}</figcaption>
</figure>
</button>
`).join("")}
</div>
` : ""}
</div>
</details>
<details class="glass-panel accordion" open>
<summary><span>Live Log Viewer</span><span class="tag">${state.selectedArtifact ? "active" : "idle"}</span></summary>
<div class="accordion-content">
<div class="log-viewer">
<div class="viewer-toolbar">
<div>
<strong id="artifactLabel">${escapeHtml(state.selectedArtifact?.label || "Select an artifact")}</strong>
<div class="mini-muted" id="artifactMeta">${escapeHtml(state.selectedArtifact?.href || "Artifacts and logs can be previewed here.")}</div>
</div>
<div class="tag-row">
<a id="artifactOpen" class="chip" href="${escapeHtml(state.selectedArtifact?.href || run.dashboard_refs.report_html)}" target="_blank" rel="noreferrer">Open artifact</a>
<button id="refreshArtifact" class="ghost-chip" type="button">Refresh preview</button>
</div>
</div>
<div class="viewer-frame" id="artifactViewer"><pre>Select a report, log, JSON, screenshot, or timeline file to preview it here.</pre></div>
</div>
</div>
</details>
</div>
<div class="stack">
<details class="glass-panel accordion" open>
<summary><span>Sources & Fix Topics</span><span class="tag">${escapeHtml((advisory.secondary_source_urls || []).length + (advisory.official_source_url ? 1 : 0))} links</span></summary>
<div class="accordion-content">
<div class="tag-row">
${(advisory.aliases || []).map((alias) => `<span class="tag">${escapeHtml(alias)}</span>`).join("")}
</div>
<div class="stack" style="gap:10px; margin-top:14px;">
${advisory.official_source_url ? `<a href="${escapeHtml(advisory.official_source_url)}" target="_blank" rel="noreferrer">${escapeHtml(advisory.official_source_url)}</a>` : `<div class="mini-muted">No official source linked.</div>`}
${(advisory.secondary_source_urls || []).map((ref) => `<a href="${escapeHtml(ref)}" target="_blank" rel="noreferrer">${escapeHtml(ref)}</a>`).join("")}
</div>
<div class="tag-row" style="margin-top:16px;">
${(advisory.secure_code_topics || []).map((topic) => `<a class="tag" href="./docs/secure-code-index.html" target="_blank" rel="noreferrer">${escapeHtml(topic)}</a>`).join("")}
</div>
</div>
</details>
<details class="glass-panel accordion">
<summary><span>Run JSON</span><span class="tag">raw</span></summary>
<div class="accordion-content"><pre class="json-block">${escapeHtml(JSON.stringify(run, null, 2))}</pre></div>
</details>
<details class="glass-panel accordion">
<summary><span>Advisory JSON</span><span class="tag">raw</span></summary>
<div class="accordion-content"><pre class="json-block">${escapeHtml(JSON.stringify(advisory, null, 2))}</pre></div>
</details>
<details class="glass-panel accordion">
<summary><span>Profile JSON</span><span class="tag">raw</span></summary>
<div class="accordion-content"><pre class="json-block">${escapeHtml(JSON.stringify(profile, null, 2))}</pre></div>
</details>
</div>
</div>
`;
document.querySelectorAll(".artifact-button").forEach((button) => {
button.addEventListener("click", () => openArtifact(button.dataset.href, button.dataset.label, button.dataset.kind));
});
$("refreshArtifact")?.addEventListener("click", () => {
if (state.selectedArtifact) {
openArtifact(state.selectedArtifact.href, state.selectedArtifact.label, state.selectedArtifact.kind);
}
});
if (!state.selectedArtifact || !(run.artifact_groups || []).some((group) => group.items.some((item) => item.href === state.selectedArtifact.href))) {
const artifact = defaultArtifact(run);
if (artifact) {
openArtifact(artifact.href, artifact.label, artifact.kind);
}
} else {
openArtifact(state.selectedArtifact.href, state.selectedArtifact.label, state.selectedArtifact.kind);
}
}
function attachGlobalActions() {
$("searchInput").addEventListener("input", (event) => {
state.filters.search = String(event.target.value || "").trim().toLowerCase();
renderRunList();
});
[["systemFilter", "system"], ["statusFilter", "status"], ["familyFilter", "family"]].forEach(([id, key]) => {
$(id).addEventListener("input", (event) => {
state.filters[key] = String(event.target.value || "");
renderRunList();
});
});
$("refreshDashboard").addEventListener("click", () => loadData(false));
$("autoRefresh").addEventListener("change", (event) => {
state.autoRefresh = Boolean(event.target.checked);
startRefreshLoop();
});
}
function startRefreshLoop() {
if (state.refreshHandle) {
clearInterval(state.refreshHandle);
state.refreshHandle = null;
}
if (!state.autoRefresh) return;
state.refreshHandle = setInterval(() => loadData(true), state.refreshMs);
}
async function init() {
["systemFilter", "statusFilter", "familyFilter"].forEach((id) => {
$(id).dataset.base = $(id).innerHTML;
});
attachGlobalActions();
await loadData(false);
startRefreshLoop();
window.addEventListener("hashchange", () => loadData(false));
}
document.addEventListener("DOMContentLoaded", init);

查看文件

@@ -0,0 +1,728 @@
:root {
--bg: #07111f;
--panel: rgba(9, 18, 32, 0.86);
--panel-2: rgba(10, 24, 44, 0.92);
--panel-soft: rgba(18, 32, 56, 0.74);
--border: rgba(137, 171, 214, 0.22);
--text: #f7fafc;
--muted: #9fb3ca;
--accent: #5eead4;
--accent-2: #ffb86b;
--accent-3: #90cdf4;
--danger: #ff7b7b;
--warning: #ffd166;
--success: #6ee7a5;
--shadow: 0 24px 80px rgba(1, 7, 20, 0.45);
--radius: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
background:
radial-gradient(circle at top left, rgba(94, 234, 212, 0.15), transparent 28%),
radial-gradient(circle at top right, rgba(255, 184, 107, 0.18), transparent 22%),
linear-gradient(145deg, #050c16 0%, #08111f 44%, #0d1c31 100%);
color: var(--text);
overflow-x: hidden;
}
body::before {
content: "";
position: fixed;
inset: 0;
pointer-events: none;
background-image:
linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
background-size: 32px 32px;
mask-image: radial-gradient(circle at center, black 36%, transparent 78%);
opacity: 0.28;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select {
font: inherit;
}
.dashboard-shell {
position: relative;
max-width: 1640px;
margin: 0 auto;
padding: 32px 24px 40px;
}
.hero {
position: sticky;
top: 0;
z-index: 20;
backdrop-filter: blur(18px);
background: linear-gradient(180deg, rgba(7, 17, 31, 0.94), rgba(7, 17, 31, 0.75));
border: 1px solid var(--border);
border-radius: 28px;
padding: 24px 24px 20px;
box-shadow: var(--shadow);
}
.hero-grid {
display: grid;
grid-template-columns: 1.6fr 1fr;
gap: 20px;
align-items: start;
}
.eyebrow {
display: inline-flex;
align-items: center;
gap: 8px;
color: var(--muted);
font-size: 0.88rem;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.eyebrow::before {
content: "";
width: 10px;
height: 10px;
border-radius: 999px;
background: radial-gradient(circle, var(--accent), rgba(94, 234, 212, 0.15));
box-shadow: 0 0 24px rgba(94, 234, 212, 0.8);
animation: pulse 2.8s ease-in-out infinite;
}
.hero h1 {
margin: 12px 0 10px;
font-family: "IBM Plex Serif", "Iowan Old Style", Georgia, serif;
font-size: clamp(2rem, 4vw, 3.5rem);
line-height: 1.02;
}
.hero p {
margin: 0;
color: var(--muted);
max-width: 74ch;
}
.hero-actions {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-top: 18px;
}
.chip, .ghost-chip {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
border-radius: 999px;
border: 1px solid var(--border);
padding: 10px 14px;
background: rgba(255,255,255,0.06);
color: var(--text);
}
.ghost-chip {
background: rgba(255,255,255,0.04);
}
.hero-meta {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
}
.meta-card, .glass-panel {
background: var(--panel);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow);
}
.meta-card {
padding: 18px;
min-height: 116px;
}
.meta-card strong {
display: block;
color: var(--muted);
font-size: 0.84rem;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.meta-card span {
display: block;
margin-top: 10px;
font-size: 2rem;
font-weight: 700;
}
.workspace {
display: grid;
grid-template-columns: 420px minmax(0, 1fr);
gap: 20px;
margin-top: 22px;
}
.sidebar {
display: flex;
flex-direction: column;
gap: 18px;
}
.panel-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 16px;
}
.panel-header h2, .panel-header h3 {
margin: 0;
font-size: 1rem;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--muted);
}
.glass-panel {
padding: 18px;
background:
linear-gradient(180deg, rgba(255,255,255,0.04), transparent 35%),
var(--panel);
}
.filters {
display: grid;
gap: 12px;
}
.filters label {
display: grid;
gap: 6px;
color: var(--muted);
font-size: 0.9rem;
}
.filters input, .filters select {
width: 100%;
background: rgba(255,255,255,0.05);
color: var(--text);
border: 1px solid rgba(159, 179, 202, 0.18);
border-radius: 14px;
padding: 12px 14px;
}
.run-list {
display: grid;
gap: 12px;
max-height: calc(100vh - 460px);
overflow: auto;
padding-right: 4px;
}
.run-card {
width: 100%;
text-align: left;
padding: 16px;
border-radius: 18px;
border: 1px solid rgba(159, 179, 202, 0.14);
background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
color: var(--text);
cursor: pointer;
transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.run-card:hover, .run-card.is-active {
transform: translateY(-1px);
border-color: rgba(94, 234, 212, 0.42);
background: linear-gradient(180deg, rgba(94, 234, 212, 0.14), rgba(255,255,255,0.05));
}
.run-card-top, .flex-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.run-card h4 {
margin: 10px 0 8px;
font-size: 1rem;
line-height: 1.35;
}
.mini-muted {
color: var(--muted);
font-size: 0.86rem;
}
.status-pill {
display: inline-flex;
align-items: center;
gap: 7px;
border-radius: 999px;
padding: 6px 10px;
font-size: 0.82rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
border: 1px solid transparent;
}
.status-pill::before {
content: "";
width: 8px;
height: 8px;
border-radius: 999px;
background: currentColor;
box-shadow: 0 0 16px currentColor;
}
.status-blocked-artifact, .status-blocked-destructive {
color: var(--danger);
background: rgba(255, 123, 123, 0.14);
border-color: rgba(255, 123, 123, 0.24);
}
.status-triage-manual, .status-suspected {
color: var(--warning);
background: rgba(255, 209, 102, 0.14);
border-color: rgba(255, 209, 102, 0.24);
}
.status-verified-real {
color: var(--success);
background: rgba(110, 231, 165, 0.14);
border-color: rgba(110, 231, 165, 0.24);
}
.status-verified-synthetic {
color: var(--accent-3);
background: rgba(144, 205, 244, 0.14);
border-color: rgba(144, 205, 244, 0.24);
}
.status-default {
color: var(--accent);
background: rgba(94, 234, 212, 0.14);
border-color: rgba(94, 234, 212, 0.24);
}
.detail-view {
display: grid;
gap: 18px;
}
.detail-hero {
padding: 22px;
overflow: hidden;
position: relative;
}
.detail-hero::after {
content: "";
position: absolute;
inset: auto -20% -55% 25%;
height: 220px;
background: radial-gradient(circle, rgba(94, 234, 212, 0.2), transparent 55%);
pointer-events: none;
}
.detail-headline {
margin: 8px 0 12px;
font-family: "IBM Plex Serif", "Iowan Old Style", Georgia, serif;
font-size: clamp(1.6rem, 3vw, 2.8rem);
line-height: 1.08;
}
.tag-row, .link-row, .artifact-row {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.tag {
display: inline-flex;
align-items: center;
padding: 7px 10px;
border-radius: 999px;
background: rgba(255,255,255,0.06);
border: 1px solid rgba(159, 179, 202, 0.18);
color: var(--text);
font-size: 0.86rem;
}
.stat-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 12px;
margin-top: 18px;
}
.stat-card {
padding: 14px;
border-radius: 16px;
background: rgba(255,255,255,0.04);
border: 1px solid rgba(159, 179, 202, 0.16);
}
.stat-card strong {
display: block;
color: var(--muted);
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.stat-card span {
display: block;
margin-top: 10px;
font-size: 1.15rem;
font-weight: 700;
}
.detail-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) 360px;
gap: 18px;
}
.stack {
display: grid;
gap: 18px;
}
.progress-strip {
display: grid;
gap: 12px;
margin-bottom: 16px;
}
.progress-bar {
display: flex;
width: 100%;
min-height: 12px;
overflow: hidden;
border-radius: 999px;
background: rgba(255,255,255,0.08);
border: 1px solid rgba(159, 179, 202, 0.14);
}
.progress-segment {
min-width: 10px;
transition: width 180ms ease;
}
.progress-completed { background: linear-gradient(90deg, rgba(110, 231, 165, 0.9), rgba(94, 234, 212, 0.9)); }
.progress-blocked { background: linear-gradient(90deg, rgba(255, 123, 123, 0.95), rgba(255, 160, 122, 0.9)); }
.progress-failed { background: linear-gradient(90deg, rgba(255, 123, 123, 0.92), rgba(255, 209, 102, 0.88)); }
.progress-skipped { background: linear-gradient(90deg, rgba(255,255,255,0.22), rgba(159, 179, 202, 0.3)); }
.progress-planned { background: linear-gradient(90deg, rgba(144, 205, 244, 0.82), rgba(94, 234, 212, 0.72)); }
.progress-other { background: linear-gradient(90deg, rgba(255,255,255,0.18), rgba(255,255,255,0.1)); }
.progress-legend {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.progress-legend .tag {
gap: 7px;
}
.progress-legend .swatch {
width: 10px;
height: 10px;
border-radius: 999px;
display: inline-block;
}
.stage-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 12px;
margin-bottom: 18px;
}
.stage-card {
padding: 14px;
border-radius: 16px;
background: rgba(255,255,255,0.04);
border: 1px solid rgba(159, 179, 202, 0.16);
}
.stage-card strong {
display: block;
margin-bottom: 10px;
}
.accordion {
overflow: hidden;
}
.accordion > summary {
list-style: none;
cursor: pointer;
padding: 18px 20px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.accordion > summary::-webkit-details-marker { display: none; }
.accordion > summary span {
font-size: 1rem;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--muted);
}
.accordion .accordion-content {
padding: 0 20px 20px;
border-top: 1px solid rgba(159, 179, 202, 0.12);
}
.timeline-list {
display: grid;
gap: 12px;
}
.timeline-item {
display: grid;
grid-template-columns: 120px 180px minmax(0, 1fr);
gap: 12px;
padding: 12px 0;
border-bottom: 1px solid rgba(159, 179, 202, 0.12);
}
.timeline-item:last-child {
border-bottom: 0;
}
.timeline-step {
font-weight: 700;
}
.artifact-group {
margin-bottom: 14px;
}
.artifact-group h4 {
margin: 0 0 10px;
color: var(--muted);
font-size: 0.88rem;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.artifact-button {
display: inline-flex;
align-items: center;
gap: 8px;
margin: 0 10px 10px 0;
padding: 10px 12px;
border-radius: 14px;
border: 1px solid rgba(159, 179, 202, 0.16);
background: rgba(255,255,255,0.05);
color: var(--text);
cursor: pointer;
}
.artifact-button:hover, .artifact-button.is-active {
border-color: rgba(94, 234, 212, 0.4);
background: rgba(94, 234, 212, 0.12);
}
.log-viewer {
min-height: 420px;
display: grid;
gap: 14px;
}
.viewer-toolbar {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 10px;
align-items: center;
}
.viewer-frame {
background: rgba(2, 8, 22, 0.88);
border: 1px solid rgba(159, 179, 202, 0.18);
border-radius: 16px;
min-height: 300px;
overflow: hidden;
}
.viewer-frame pre {
margin: 0;
padding: 18px;
max-height: 560px;
overflow: auto;
font-family: "IBM Plex Mono", "SFMono-Regular", "Menlo", monospace;
font-size: 0.88rem;
line-height: 1.6;
color: #d6e5f5;
white-space: pre-wrap;
}
.viewer-frame img {
display: block;
width: 100%;
height: auto;
}
.gallery {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 14px;
}
.gallery button {
all: unset;
cursor: pointer;
border-radius: 18px;
overflow: hidden;
border: 1px solid rgba(159, 179, 202, 0.18);
background: rgba(255,255,255,0.04);
}
.gallery img {
display: block;
width: 100%;
aspect-ratio: 4 / 3;
object-fit: cover;
}
.gallery figcaption {
padding: 10px 12px 14px;
color: var(--muted);
font-size: 0.84rem;
}
.failure-callout {
padding: 16px 18px;
border-radius: 18px;
border: 1px solid rgba(255, 123, 123, 0.2);
background: rgba(255, 123, 123, 0.09);
}
.json-block {
background: rgba(2, 8, 22, 0.72);
border-radius: 16px;
border: 1px solid rgba(159, 179, 202, 0.14);
padding: 16px;
overflow: auto;
font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
font-size: 0.84rem;
line-height: 1.55;
color: #c9d8e8;
}
.empty-state {
padding: 40px 24px;
text-align: center;
color: var(--muted);
}
.failure-feed {
display: grid;
gap: 10px;
}
.failure-item {
padding: 12px 14px;
border-radius: 16px;
background: rgba(255,255,255,0.04);
border: 1px solid rgba(159, 179, 202, 0.16);
}
.system-grid {
display: grid;
gap: 10px;
}
.system-card {
padding: 14px 16px;
border-radius: 16px;
background: rgba(255,255,255,0.04);
border: 1px solid rgba(159, 179, 202, 0.14);
}
.meter {
position: relative;
height: 10px;
border-radius: 999px;
background: rgba(255,255,255,0.08);
overflow: hidden;
margin-top: 10px;
}
.meter > span {
position: absolute;
inset: 0 auto 0 0;
width: var(--fill, 0%);
background: linear-gradient(90deg, var(--accent), var(--accent-2));
border-radius: inherit;
}
.sync-indicator {
display: inline-flex;
align-items: center;
gap: 8px;
}
.sync-indicator strong {
color: var(--text);
}
.dot {
width: 10px;
height: 10px;
border-radius: 999px;
background: var(--accent);
box-shadow: 0 0 18px rgba(94, 234, 212, 0.8);
}
@keyframes pulse {
0%, 100% { transform: scale(1); opacity: 0.88; }
50% { transform: scale(1.35); opacity: 1; }
}
@media (max-width: 1280px) {
.workspace, .detail-grid, .hero-grid {
grid-template-columns: 1fr;
}
.stat-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 760px) {
.dashboard-shell {
padding: 18px 14px 32px;
}
.hero {
position: static;
}
.stat-grid, .hero-meta {
grid-template-columns: 1fr;
}
.timeline-item {
grid-template-columns: 1fr;
}
}

查看文件

@@ -0,0 +1 @@
../docs

查看文件

@@ -0,0 +1,81 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>websafe authorized lab dashboard</title>
<link rel="stylesheet" href="./assets/styles.css">
</head>
<body>
<div class="dashboard-shell">
<header class="hero">
<div class="hero-grid">
<div>
<div class="eyebrow">Authorized Lab Dashboard</div>
<h1>本地攻防实证工作台</h1>
<p>面向授权实验场景的本地静态前端。聚合 advisory、run bundle、日志、浏览器证据、失败原因、利用思路与源头信息,并支持可折叠细节与自动刷新。</p>
<div class="hero-actions">
<button id="refreshDashboard" class="chip" type="button">Refresh Dashboard</button>
<label class="ghost-chip"><input id="autoRefresh" type="checkbox" checked> Auto Refresh</label>
<a class="ghost-chip" href="./summary.json" target="_blank" rel="noreferrer">Open Summary JSON</a>
<a class="ghost-chip" href="./docs/project-features.html" target="_blank" rel="noreferrer">Open Feature Docs</a>
</div>
</div>
<div>
<div class="panel-header">
<h2>Sync State</h2>
<div id="syncState" class="sync-indicator"><span class="dot"></span><strong>Booting</strong><span>Loading generated JSON</span></div>
</div>
<div id="metrics" class="hero-meta"></div>
</div>
</div>
</header>
<div class="workspace">
<aside class="sidebar">
<section class="glass-panel">
<div class="panel-header">
<h2>Filters</h2>
<span id="runCount" class="tag">0 shown</span>
</div>
<div class="filters">
<label>Search
<input id="searchInput" placeholder="Search run id, advisory, title">
</label>
<label>System
<select id="systemFilter"><option value="">All systems</option></select>
</label>
<label>Status
<select id="statusFilter"><option value="">All statuses</option></select>
</label>
<label>Profile
<select id="familyFilter"><option value="">All profiles</option></select>
</label>
</div>
</section>
<section class="glass-panel">
<div class="panel-header"><h2>Systems</h2></div>
<div id="systemCoverage" class="system-grid"></div>
</section>
<section class="glass-panel">
<div class="panel-header"><h2>Recent Failures</h2></div>
<div id="failureFeed" class="failure-feed"></div>
</section>
<section class="glass-panel">
<div class="panel-header"><h2>Run Queue View</h2></div>
<div id="runList" class="run-list"></div>
</section>
</aside>
<main id="detailRoot" class="detail-view">
<div class="glass-panel empty-state">Select a run to inspect full details.</div>
</main>
</div>
</div>
<script src="./assets/app.js"></script>
</body>
</html>

查看文件

@@ -0,0 +1 @@
../profiles.json

查看文件

@@ -0,0 +1 @@
../runs

查看文件

@@ -0,0 +1 @@
../runs.json

查看文件

@@ -0,0 +1 @@
../summary.json

查看文件

@@ -0,0 +1 @@
../systems.json

查看文件

@@ -1,5 +1,5 @@
{
"generated_at": "2026-03-17T07:36:43+00:00",
"generated_at": "2026-03-17T08:20:30+00:00",
"advisory_count": 89,
"run_count": 3,
"statuses": {

查看文件

@@ -1,6 +1,6 @@
# 最新同步摘要
- 渲染时间: `2026-03-17T07:36:11+00:00`
- 渲染时间: `2026-03-17T08:20:30+00:00`
- 系统数量: `62`
- Advisory 数量: `89`
- 重点 Markdown 数量: `89`

查看文件

@@ -1,5 +1,5 @@
{
"generated_at": "2026-03-17T07:36:11+00:00",
"generated_at": "2026-03-17T08:20:30+00:00",
"system_count": 62,
"advisory_count": 89,
"markdown_count": 89,