style(obs): compact budget workbench copy
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
This commit is contained in:
@@ -9,6 +9,9 @@
|
||||
.gov-kicker { color:var(--obs-accent); font-size:.76rem; letter-spacing:.13em; text-transform:uppercase; font-weight:850; }
|
||||
.gov-title { margin:.45rem 0 .25rem; font-family: var(--momo-font-display, "Inter", "Noto Sans TC", system-ui, sans-serif); font-size:var(--obs-title-size); letter-spacing: 0; line-height:.98; }
|
||||
.gov-subtitle { color:var(--obs-muted); max-width:850px; line-height:1.7; }
|
||||
.gov-mode-row { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.75rem; }
|
||||
.gov-mode { display:inline-flex; align-items:center; min-height:28px; padding:.32rem .65rem; border:1px solid var(--obs-line); border-radius:10px; background:rgba(255,255,255,.62); color:var(--obs-muted); font-size:.74rem; font-weight:850; white-space:nowrap; }
|
||||
.gov-subtitle, .gov-action-note, .gov-note, .gov-footer-copy { display:none; }
|
||||
.gov-actions { display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; margin-top:1rem; }
|
||||
.gov-command { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.75rem; margin-top:1rem; }
|
||||
.gov-signal { padding:.95rem; border:1px solid var(--obs-line); border-radius:20px; background:rgba(255,255,255,.62); }
|
||||
@@ -37,11 +40,12 @@
|
||||
{% set total_ratio = (total_spent.value / total_budget.value * 100) if total_budget.value > 0 else 0 %}
|
||||
|
||||
<div class="container-fluid mt-3">
|
||||
<section class="gov-hero">
|
||||
<section class="gov-hero" data-density-guardrail="compact-budget-workbench">
|
||||
<div class="gov-kicker"><i class="fas fa-wallet me-1"></i> AI 成本治理 · 預算 / 節流 / 知識策略</div>
|
||||
<h1 class="gov-title">AI 成本治理艙</h1>
|
||||
<div class="gov-mode-row" aria-label="AI 成本狀態模式"><span class="gov-mode">成本守門</span><span class="gov-mode">節流狀態</span><span class="gov-mode">知識策略</span></div>
|
||||
<p class="gov-subtitle">控制 AI 花費與節流狀態,把預算留給能推動業績的任務。</p>
|
||||
<div class="gov-actions"><button class="btn btn-warning btn-sm" onclick="forceThrottle()"><i class="fas fa-bolt me-1"></i>立即重算節流狀態</button><span class="text-muted small">預算超線時立即重算節流。</span></div>
|
||||
<div class="gov-actions"><button class="btn btn-warning btn-sm" onclick="forceThrottle()"><i class="fas fa-bolt me-1"></i>重算節流</button><span class="text-muted small gov-action-note">預算超線時立即重算節流。</span></div>
|
||||
<div class="gov-command">
|
||||
<div class="gov-signal"><div class="gov-label">當月花費</div><span class="gov-value">${{ "%.2f"|format(total_spent.value) }}</span><div class="gov-note">預算 ${{ "%.2f"|format(total_budget.value) }}</div></div>
|
||||
<div class="gov-signal"><div class="gov-label">預算使用率</div><span class="gov-value {% if total_ratio >= 110 %}status-bad{% elif total_ratio >= 80 %}status-warn{% else %}status-good{% endif %}">{{ "%.0f"|format(total_ratio) }}%</span><div class="gov-note">全供應商加總</div></div>
|
||||
@@ -83,7 +87,7 @@
|
||||
<section class="gov-panel mt-3"><div class="gov-panel-head"><div><div class="gov-label">商業產出</div><h2 class="gov-panel-title">AI 價格決策 7 日</h2></div></div><div class="gov-panel-body"><div class="gov-mini-grid">{% for p in price_rec_7d %}<div class="gov-mini"><span class="gov-label">{{ obs_label.strategy(p.strategy) }}</span><strong>{{ p.count }}</strong><small class="text-muted">信心 {{ "%.2f"|format(p.avg_confidence) }}</small></div>{% endfor %}</div></div></section>
|
||||
{% endif %}
|
||||
|
||||
<p class="text-muted mt-3"><small><i class="fas fa-robot me-1"></i>AI 成本治理艙</small></p>
|
||||
<p class="text-muted mt-3 gov-footer-copy"><small><i class="fas fa-robot me-1"></i>AI 成本治理艙</small></p>
|
||||
</div>
|
||||
|
||||
{% set budget_payload = {
|
||||
|
||||
Reference in New Issue
Block a user