優化 PPT 產線健康總覽
All checks were successful
CD Pipeline / deploy (push) Successful in 1m6s

This commit is contained in:
OoO
2026-05-18 19:00:18 +08:00
parent f5b9f1bd74
commit ebbf7bc063
7 changed files with 392 additions and 17 deletions

View File

@@ -128,6 +128,31 @@
</div>
</section>
{% endif %}
<section class="ppt-health-board" aria-label="PPT 產線健康總覽">
<div class="ppt-health-main is-{{ pipeline_view.status }}">
<div class="ppt-label">Pipeline Health</div>
<h2>{{ pipeline_view.title }}</h2>
<p>{{ pipeline_view.message }}</p>
<div class="ppt-health-facts">
<span><strong>{{ pipeline_view.ready_count }}/{{ pipeline_view.total_count }}</strong> 定義覆蓋</span>
<span><strong>{{ pipeline_view.valid_preview_count }}</strong> 份可預覽</span>
<span><strong>{{ pipeline_view.audit_total }}</strong> 筆視覺 QA</span>
</div>
</div>
<div class="ppt-stage-grid">
{% for stage in pipeline_view.stages %}
<article class="ppt-stage-card is-{{ stage.status }}">
<div class="ppt-stage-icon"><i class="fas fa-{{ stage.icon }}" aria-hidden="true"></i></div>
<div>
<div class="ppt-label">{{ stage.label }}</div>
<strong>{{ stage.value }}</strong>
<small>{{ stage.meta }}</small>
<p>{{ stage.detail }}</p>
</div>
</article>
{% endfor %}
</div>
</section>
<section class="ppt-panel mt-3"
data-ppt-auto-generation
data-auto-start="{{ 'true' if auto_generation.can_auto_start else 'false' }}"
@@ -154,9 +179,15 @@
<span style="width: {{ cadence.progress_pct }}%"></span>
</div>
<div class="ppt-cadence-meta">
<span>{{ cadence.gate }}</span>
{% if cadence.missing_count > 0 %}<span>{{ cadence.missing_count }} 類</span>{% else %}<span>完整</span>{% endif %}
<span>{{ cadence.status_label }}</span>
<span>{{ cadence.coverage_text }}</span>
</div>
<p class="ppt-cadence-gate">{{ cadence.description }}</p>
{% if cadence.missing_count > 0 %}
<small class="text-muted">待補:{{ cadence.missing_report_labels[:3]|join('、') }}{% if cadence.missing_report_labels|length > 3 %} 等 {{ cadence.missing_report_labels|length }} 類{% endif %}</small>
{% else %}
<small class="status-good">{{ cadence.status_hint }}</small>
{% endif %}
</article>
{% endfor %}
</div>
@@ -181,12 +212,13 @@
<div class="ppt-coverage-list" aria-label="定義簡報覆蓋明細">
{% for item in auto_generation_items %}
<div class="ppt-coverage-row">
<div>
<strong>{{ item.label }}</strong>
<small>{{ item.target_label or '最新資料' }}{% if item.latest_generated_at %} · {{ item.latest_generated_at }}{% endif %}</small>
</div>
<span class="ppt-run-status {% if item.ready %}is-ready{% elif item.has_other_versions %}is-partial{% else %}is-missing_file{% endif %}">
{% if item.ready %}已產生{% elif item.has_other_versions %}其他版本{% else %}待補齊{% endif %}
<div>
<strong>{{ item.label }}</strong>
<small>{{ item.target_label or '最新資料' }}{% if item.latest_generated_at %} · {{ item.latest_generated_at }}{% endif %}</small>
<small>{{ item.status_hint }}</small>
</div>
<span class="ppt-run-status is-{{ item.status }}">
{{ item.status_label }}
</span>
</div>
{% endfor %}
@@ -217,6 +249,11 @@
<span class="ppt-run-target">{{ run.target_label or '最新資料' }}</span>
<span class="ppt-run-status is-{{ run.status }}">{{ run.status_label }}</span>
<small class="text-muted">{{ run.started_at }}{% if run.finished_at %} → {{ run.finished_at }}{% endif %}</small>
{% if run.file_name %}
<a class="btn btn-outline-primary btn-sm" href="{{ url_for('admin_observability.ppt_audit_file', filename=run.file_name) }}" target="_blank" rel="noopener">
<i class="fas fa-eye me-1"></i>預覽
</a>
{% endif %}
</div>
{% endfor %}
</div>