feat(governance): add agent market automation surfaces
Some checks failed
Ansible Lint / lint (push) Successful in 35s
CD Pipeline / tests (push) Failing after 13s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped
Code Review / ai-code-review (push) Failing after 11s

This commit is contained in:
Your Name
2026-06-04 21:40:12 +08:00
parent b9bd5e3ba8
commit cfb866d055
334 changed files with 62000 additions and 82 deletions

View File

@@ -112,7 +112,7 @@ export function FlywheelKPICard() {
}
}, [])
const fmt = (n: number | undefined, digits = 0) =>
const fmt = (n: number | null | undefined, digits = 0) =>
n == null ? '--' : n.toLocaleString(undefined, { maximumFractionDigits: digits })
const pct = (n: number | null | undefined) =>

View File

@@ -81,7 +81,7 @@ function HostCard({ host }: { host: HostInfo }) {
<div style={{ width: 6, height: 6, borderRadius: '50%', background: accentColor, flexShrink: 0 }} />
<span style={{ fontSize: 12, fontWeight: 700, color: '#141413', fontFamily: 'var(--font-body), monospace' }}>
{/* 顯示末段 IP 作為簡短標識,完整名稱放 IP 欄位 */}
{host.ip.split('.').pop() ?? host.hostname}
{host.ip.includes('.') ? host.ip.split('.').pop() ?? host.ip : host.hostname}
</span>
{isK3s && (
<span style={{
@@ -92,8 +92,8 @@ function HostCard({ host }: { host: HostInfo }) {
</span>
)}
</div>
<span style={{ fontSize: 10, color: '#b0ad9f', fontFamily: 'monospace' }}>{host.ip}</span>
</div>
<span style={{ fontSize: 10, color: '#b0ad9f', fontFamily: 'monospace' }}>{host.ip}</span>
</div>
<div style={{ display: 'flex', gap: 10, marginTop: 2 }}>
<span style={{ fontSize: 10, color: '#b0ad9f' }}>CPU <MetricBar value={host.cpuPct} /></span>
<span style={{ fontSize: 10, color: '#b0ad9f' }}>RAM <MetricBar value={host.ramPct} /></span>
@@ -117,6 +117,9 @@ function HostCard({ host }: { host: HostInfo }) {
)
}
const K8S_VIP_INFO_FALLBACK =
'K8S VIP topology (ops-only) · kubectl:6443 · web:32335 · api:32334'
export function HostGrid({ hosts }: HostGridProps) {
if (hosts.length === 0) {
return <div style={{ padding: 16, textAlign: 'center', color: '#b0ad9f', fontSize: 12 }}>--</div>
@@ -150,7 +153,7 @@ export function HostGrid({ hosts }: HostGridProps) {
K3S CLUSTER (HA)
</span>
<span style={{ fontSize: 10, color: '#3b7de8' }}>
{process.env.NEXT_PUBLIC_K8S_VIP_INFO ?? 'VIP 192.168.0.125 · kubectl :6443 · Web :32335 · API :32334'}
{(process.env.NEXT_PUBLIC_K8S_VIP_INFO ?? '').trim() || K8S_VIP_INFO_FALLBACK}
</span>
</div>
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 6, padding: 6 }}>