feat(portal): add enterprise GitOps console layout
This commit is contained in:
@@ -3,48 +3,112 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<title>AIOS GitOps 控制台</title>
|
||||
<title>AIOS Enterprise GitOps Control Plane</title>
|
||||
<link rel="stylesheet" href="./styles.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="shell">
|
||||
<header class="topbar">
|
||||
<div>
|
||||
<p class="eyebrow">cnnetmkt.top / AIOS</p>
|
||||
<h1>GitOps Web 控制台</h1>
|
||||
<p class="eyebrow">cnnetmkt.top / AIOS Enterprise</p>
|
||||
<h1>GitOps Enterprise Control Plane</h1>
|
||||
<p class="subtitle">审批流、RBAC、Release Pipeline、Diff Tree、模型优先级、审计查询</p>
|
||||
</div>
|
||||
<div class="statusbar">
|
||||
<span id="runtime-chip" class="chip muted">runtime: unknown</span>
|
||||
<span id="role-chip" class="chip">role: loading</span>
|
||||
<span id="runtime-chip" class="chip muted">runtime: loading</span>
|
||||
<button id="refresh-all" class="primary">刷新全部</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<nav class="tabs" aria-label="GitOps modules">
|
||||
<nav class="tabs" aria-label="Enterprise GitOps modules">
|
||||
<button data-tab="overview" class="active">总览</button>
|
||||
<button data-tab="diff">Diff</button>
|
||||
<button data-tab="rbac">RBAC</button>
|
||||
<button data-tab="approval">审批流</button>
|
||||
<button data-tab="diff">Diff Tree</button>
|
||||
<button data-tab="patch">Patch / Branch</button>
|
||||
<button data-tab="model">模型</button>
|
||||
<button data-tab="release">发布 / 回滚请求</button>
|
||||
<button data-tab="audit">审计</button>
|
||||
<button data-tab="model">模型控制</button>
|
||||
<button data-tab="release">Release Pipeline</button>
|
||||
<button data-tab="audit">审计中心</button>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
<section id="tab-overview" class="tab active grid two">
|
||||
<article class="card"><h2>Baseline</h2><pre id="baseline-output">loading...</pre></article>
|
||||
<article class="card"><h2>Versions</h2><pre id="versions-output">loading...</pre></article>
|
||||
<article class="card"><h2>Runtime</h2><pre id="runtime-output">loading...</pre></article>
|
||||
<article class="card"><h2>Patch Summary</h2><pre id="patch-summary-output">loading...</pre></article>
|
||||
<section id="tab-overview" class="tab active">
|
||||
<div class="grid four">
|
||||
<article class="metric"><span>Runtime</span><strong id="metric-runtime">-</strong></article>
|
||||
<article class="metric"><span>Active Version</span><strong id="metric-version">-</strong></article>
|
||||
<article class="metric"><span>Patch Branches</span><strong id="metric-branches">-</strong></article>
|
||||
<article class="metric"><span>Pending Approvals</span><strong id="metric-approvals">-</strong></article>
|
||||
</div>
|
||||
<div class="grid two">
|
||||
<article class="card"><h2>Baseline</h2><pre id="baseline-output">loading...</pre></article>
|
||||
<article class="card"><h2>Versions</h2><pre id="versions-output">loading...</pre></article>
|
||||
<article class="card"><h2>Runtime</h2><pre id="runtime-output">loading...</pre></article>
|
||||
<article class="card"><h2>Patch Summary</h2><pre id="patch-summary-output">loading...</pre></article>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="tab-rbac" class="tab grid two">
|
||||
<article class="card">
|
||||
<h2>当前用户权限</h2>
|
||||
<p class="hint">按钮级权限由 role + capability 共同控制;viewer 只能读。</p>
|
||||
<pre id="identity-output">loading...</pre>
|
||||
</article>
|
||||
<article class="card">
|
||||
<h2>RBAC 策略</h2>
|
||||
<pre id="rbac-output">loading...</pre>
|
||||
</article>
|
||||
<article class="card span-two">
|
||||
<h2>权限矩阵</h2>
|
||||
<div id="permission-matrix" class="table-wrap">loading...</div>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section id="tab-approval" class="tab">
|
||||
<div class="grid two">
|
||||
<article class="card">
|
||||
<h2>Approval Queue</h2>
|
||||
<p class="hint">高风险操作进入审批队列;UI 不直接执行 destructive / production 变更。</p>
|
||||
<div class="toolbar">
|
||||
<button id="refresh-approvals" class="secondary">刷新审批队列</button>
|
||||
<button id="clear-local-approvals" class="secondary guarded">清理本地缓存</button>
|
||||
</div>
|
||||
<div id="approval-board" class="approval-board">loading...</div>
|
||||
</article>
|
||||
<article class="card">
|
||||
<h2>创建审批请求</h2>
|
||||
<form id="approval-form" class="stack">
|
||||
<label>类型
|
||||
<select name="type">
|
||||
<option value="merge">merge</option>
|
||||
<option value="release">release</option>
|
||||
<option value="rollback">rollback</option>
|
||||
<option value="model_priority">model_priority</option>
|
||||
<option value="runtime_change">runtime_change</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>目标 <input name="target" placeholder="branch / version / model id" required /></label>
|
||||
<label>风险
|
||||
<select name="risk"><option>low</option><option selected>medium</option><option>high</option></select>
|
||||
</label>
|
||||
<label>说明 <textarea name="reason" rows="5" required></textarea></label>
|
||||
<button class="primary require-operator" type="submit">提交审批请求</button>
|
||||
</form>
|
||||
<pre id="approval-output">等待操作...</pre>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="tab-diff" class="tab">
|
||||
<article class="card">
|
||||
<h2>Diff 查看</h2>
|
||||
<p class="hint">支持指定 from/to;大 diff 自动提示使用版本或短提交范围。</p>
|
||||
<form id="diff-form" class="form-row">
|
||||
<h2>File-level Diff Tree</h2>
|
||||
<p class="hint">支持 from/to 参数;会自动按文件聚合 diff,便于 review。</p>
|
||||
<form id="diff-form" class="form-row wrap">
|
||||
<label>From <input name="from" value="HEAD~1" /></label>
|
||||
<label>To <input name="to" value="HEAD" /></label>
|
||||
<button class="primary" type="submit">读取 Diff</button>
|
||||
</form>
|
||||
<div id="diff-tree" class="diff-tree">等待查询...</div>
|
||||
<pre id="diff-output">等待查询...</pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -52,92 +116,104 @@
|
||||
<section id="tab-patch" class="tab grid two">
|
||||
<article class="card">
|
||||
<h2>创建 Patch Branch</h2>
|
||||
<p class="hint">默认从 main 创建非生产 patch 分支;直接 main 写入不在此 UI 暴露。</p>
|
||||
<p class="hint">默认从 main 创建非生产 patch 分支;main 写入仅通过明确授权的 GitOps Action。</p>
|
||||
<form id="branch-form" class="stack">
|
||||
<label>Branch <input name="branch" placeholder="patch/my-change" required /></label>
|
||||
<label>Base <input name="base" value="main" /></label>
|
||||
<label>Message <input name="message" value="Create GitOps patch branch" /></label>
|
||||
<button class="primary" type="submit">创建 Branch</button>
|
||||
<button class="primary require-operator" type="submit">创建 Branch</button>
|
||||
</form>
|
||||
<pre id="branch-output">等待操作...</pre>
|
||||
</article>
|
||||
|
||||
<article class="card">
|
||||
<h2>自然语言 GitOps Plan</h2>
|
||||
<p class="hint">仅生成可审计 plan,默认不执行高风险变更。</p>
|
||||
<p class="hint">仅生成可审计 plan;高风险操作必须审批。</p>
|
||||
<form id="plan-form" class="stack">
|
||||
<label>目标 Branch <input name="branch" value="patch/web-ui-complete-gitops-dashboard-20260706" /></label>
|
||||
<label>Plan Text <textarea name="text" rows="5" placeholder="描述要执行的 GitOps 变更" required></textarea></label>
|
||||
<button class="primary" type="submit">生成 Plan</button>
|
||||
<button class="primary require-operator" type="submit">生成 Plan</button>
|
||||
</form>
|
||||
<pre id="plan-output">等待操作...</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section id="tab-model" class="tab grid two">
|
||||
<article class="card">
|
||||
<h2>模型注册表</h2>
|
||||
<button id="refresh-model" class="secondary">刷新模型</button>
|
||||
<pre id="model-output">loading...</pre>
|
||||
</article>
|
||||
|
||||
<article class="card">
|
||||
<h2>注册自定义模型</h2>
|
||||
<p class="hint">仅允许填写 secret_ref;禁止在 UI/Git 中提交真实 API key。</p>
|
||||
<form id="model-form" class="stack">
|
||||
<label>Provider <input name="provider_name" placeholder="openai / one-api / compatible" required /></label>
|
||||
<label>Base URL <input name="base_url" placeholder="https://example.com/v1" required /></label>
|
||||
<label>Model Name <input name="model_name" placeholder="model-id" required /></label>
|
||||
<label>Display Name <input name="display_name" placeholder="Human readable name" /></label>
|
||||
<label>API Key Secret Ref <input name="api_key_secret_ref" placeholder="secret_ref://..." required /></label>
|
||||
<button class="primary" type="submit">注册模型</button>
|
||||
</form>
|
||||
<pre id="model-register-output">等待操作...</pre>
|
||||
</article>
|
||||
|
||||
<article class="card span-two">
|
||||
<h2>模型优先级</h2>
|
||||
<form id="priority-form" class="form-row wrap">
|
||||
<label>Model ID <input name="model_id" placeholder="base.gpt-5.5" required /></label>
|
||||
<label>Priority <input name="priority" type="number" value="100" required /></label>
|
||||
<label>Enabled <select name="enabled"><option value="true">true</option><option value="false">false</option></select></label>
|
||||
<label>Fallback Policy <input name="fallback_policy" value="next_enabled" /></label>
|
||||
<button class="primary" type="submit">保存优先级</button>
|
||||
</form>
|
||||
<pre id="priority-output">等待操作...</pre>
|
||||
</article>
|
||||
<section id="tab-model" class="tab">
|
||||
<div class="grid two">
|
||||
<article class="card">
|
||||
<h2>模型注册表</h2>
|
||||
<button id="refresh-model" class="secondary">刷新模型</button>
|
||||
<pre id="model-output">loading...</pre>
|
||||
</article>
|
||||
<article class="card">
|
||||
<h2>模型优先级图</h2>
|
||||
<div id="model-priority-graph" class="graph">loading...</div>
|
||||
</article>
|
||||
<article class="card">
|
||||
<h2>注册自定义模型</h2>
|
||||
<p class="hint">仅允许 secret_ref;禁止真实 API key 明文。</p>
|
||||
<form id="model-form" class="stack">
|
||||
<label>Provider <input name="provider_name" placeholder="openai / one-api / compatible" required /></label>
|
||||
<label>Base URL <input name="base_url" placeholder="https://example.com/v1" required /></label>
|
||||
<label>Model Name <input name="model_name" placeholder="model-id" required /></label>
|
||||
<label>Display Name <input name="display_name" placeholder="Human readable name" /></label>
|
||||
<label>API Key Secret Ref <input name="api_key_secret_ref" placeholder="secret_ref://..." required /></label>
|
||||
<button class="primary require-admin" type="submit">注册模型</button>
|
||||
</form>
|
||||
<pre id="model-register-output">等待操作...</pre>
|
||||
</article>
|
||||
<article class="card">
|
||||
<h2>模型优先级 / Fallback</h2>
|
||||
<form id="priority-form" class="stack">
|
||||
<label>Model ID <input name="model_id" placeholder="base.gpt-5.5" required /></label>
|
||||
<label>Priority <input name="priority" type="number" value="100" required /></label>
|
||||
<label>Enabled <select name="enabled"><option value="true">true</option><option value="false">false</option></select></label>
|
||||
<label>Fallback Policy <input name="fallback_policy" value="next_enabled" /></label>
|
||||
<button class="primary require-admin" type="submit">保存优先级</button>
|
||||
</form>
|
||||
<pre id="priority-output">等待操作...</pre>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="tab-release" class="tab grid two">
|
||||
<article class="card danger-zone">
|
||||
<h2>Rollback Request</h2>
|
||||
<p class="hint">高风险操作只创建审批请求,不直接执行回滚。</p>
|
||||
<form id="rollback-form" class="stack">
|
||||
<label>Target Version <input name="target_version" placeholder="V1R1C3" required /></label>
|
||||
<label>Reason <textarea name="reason" rows="4" required></textarea></label>
|
||||
<label>Request Branch <input name="branch" value="patch/rollback-request-web-ui" /></label>
|
||||
<button class="danger" type="submit">创建 Rollback 请求</button>
|
||||
</form>
|
||||
<pre id="rollback-output">等待操作...</pre>
|
||||
</article>
|
||||
|
||||
<article class="card danger-zone">
|
||||
<h2>Tag / Version Request</h2>
|
||||
<p class="hint">默认创建 owner/admin approval request;不直接创建生产 tag。</p>
|
||||
<form id="tag-form" class="stack">
|
||||
<label>Version <input name="version" placeholder="V1R1C5" required /></label>
|
||||
<label>Message <input name="message" placeholder="Release request" /></label>
|
||||
<label><input name="execute" type="checkbox" disabled /> 直接执行(UI 禁用,仅 owner action 可开启)</label>
|
||||
<button class="danger" type="submit">创建 Tag 请求</button>
|
||||
</form>
|
||||
<pre id="tag-output">等待操作...</pre>
|
||||
</article>
|
||||
<section id="tab-release" class="tab">
|
||||
<div class="pipeline" id="release-pipeline">
|
||||
<div class="stage">Patch</div><div class="arrow">→</div><div class="stage">Review</div><div class="arrow">→</div><div class="stage">Approval</div><div class="arrow">→</div><div class="stage guarded-stage">Tag Request</div><div class="arrow">→</div><div class="stage guarded-stage">Deploy</div>
|
||||
</div>
|
||||
<div class="grid two">
|
||||
<article class="card danger-zone">
|
||||
<h2>Rollback Request</h2>
|
||||
<p class="hint">只创建审批请求;不直接执行回滚。</p>
|
||||
<form id="rollback-form" class="stack">
|
||||
<label>Target Version <input name="target_version" placeholder="V1R1C3" required /></label>
|
||||
<label>Reason <textarea name="reason" rows="4" required></textarea></label>
|
||||
<label>Request Branch <input name="branch" value="patch/rollback-request-web-ui" /></label>
|
||||
<button class="danger require-admin" type="submit">创建 Rollback 请求</button>
|
||||
</form>
|
||||
<pre id="rollback-output">等待操作...</pre>
|
||||
</article>
|
||||
<article class="card danger-zone">
|
||||
<h2>Tag / Version Request</h2>
|
||||
<p class="hint">默认创建 owner/admin approval request;UI 禁用直接执行。</p>
|
||||
<form id="tag-form" class="stack">
|
||||
<label>Version <input name="version" placeholder="V1R1C5" required /></label>
|
||||
<label>Message <input name="message" placeholder="Release request" /></label>
|
||||
<label class="disabled"><input name="execute" type="checkbox" disabled /> 直接执行(禁用)</label>
|
||||
<button class="danger require-admin" type="submit">创建 Tag 请求</button>
|
||||
</form>
|
||||
<pre id="tag-output">等待操作...</pre>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="tab-audit" class="tab">
|
||||
<article class="card">
|
||||
<h2>审计日志 / 操作结果</h2>
|
||||
<p class="hint">所有写操作必须返回 branch/commit/rev/sync_status 中至少一项,且不得包含真实密钥。</p>
|
||||
<h2>审计中心</h2>
|
||||
<div class="toolbar">
|
||||
<input id="audit-filter" placeholder="过滤 action / target / status" />
|
||||
<button id="export-audit" class="secondary">导出 JSON</button>
|
||||
<button id="refresh-audit" class="secondary">刷新</button>
|
||||
</div>
|
||||
<div id="audit-table" class="table-wrap">loading...</div>
|
||||
<pre id="audit-output">暂无操作。</pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -145,4 +221,4 @@
|
||||
</div>
|
||||
<script src="./app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user