統一工具頁新版殼層
All checks were successful
CD Pipeline / deploy (push) Successful in 59s

This commit is contained in:
OoO
2026-05-14 00:57:29 +08:00
parent 93fa0c238a
commit 869cf2da31
10 changed files with 62 additions and 38 deletions

View File

@@ -320,7 +320,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '')
# ==========================================
# 系統版本與路徑
# ==========================================
SYSTEM_VERSION = "V10.148"
SYSTEM_VERSION = "V10.149"
LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log')
public_url = PUBLIC_URL # 用於模板顯示

View File

@@ -18,7 +18,7 @@ pchome_bp = Blueprint('pchome', __name__)
@login_required
def pchome_crawler_page():
"""PChome 爬蟲管理頁面"""
return render_template('pchome_crawler.html')
return render_template('pchome_crawler.html', active_page='pchome_crawler')
# PChome 24h 館別代碼 (完整中分類)

View File

@@ -28,7 +28,7 @@ price_comparison_bp = Blueprint('price_comparison', __name__)
@login_required
def price_comparison_page():
"""比價管理頁面"""
return render_template('price_comparison.html')
return render_template('price_comparison.html', active_page='price_comparison')
# ============================================

View File

@@ -34,7 +34,7 @@ trend_bp = Blueprint('trend', __name__)
@login_required
def trends_page():
"""趨勢資料頁面"""
return render_template('trends.html')
return render_template('trends.html', active_page='trends')
# ===== API 路由 =====

View File

@@ -1,16 +1,16 @@
{% extends 'base.html' %}
{% extends 'ewoooc_base.html' %}
{% block title %}AI 自動化 Smoke Dashboard - WOOO TECH{% endblock %}
{% block title %}AI 自動化 Smoke Dashboard - EwoooC{% endblock %}
{% block extra_css %}
<style>
.smoke-hero {
background: radial-gradient(circle at top left, rgba(42, 82, 152, 0.24), transparent 36%),
linear-gradient(135deg, #10243f 0%, #1e3c72 48%, #2a5298 100%);
color: #fff;
border-radius: 22px;
background: var(--momo-dot-grid), var(--momo-bg-surface);
color: var(--momo-text-primary);
border: 1px solid var(--momo-border-strong);
border-radius: var(--momo-radius-md);
padding: 28px;
box-shadow: 0 18px 40px rgba(16, 36, 63, 0.22);
box-shadow: var(--momo-shadow-soft);
overflow: hidden;
position: relative;
}
@@ -22,8 +22,8 @@
height: 280px;
right: -90px;
top: -90px;
border-radius: 999px;
border: 42px solid rgba(255, 255, 255, 0.08);
border: 42px solid rgba(166, 103, 45, 0.08);
transform: rotate(-8deg);
}
.smoke-pill {
@@ -31,9 +31,10 @@
align-items: center;
gap: 8px;
padding: 8px 13px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.14);
backdrop-filter: blur(10px);
border-radius: var(--momo-radius-sm);
background: var(--momo-tag-caramel-bg);
border: 1px solid var(--momo-tag-caramel-border);
color: var(--momo-tag-caramel-text);
font-size: 13px;
letter-spacing: 0.04em;
}
@@ -45,20 +46,20 @@
}
.smoke-card {
border: 0;
border-radius: 18px;
box-shadow: 0 10px 28px rgba(30, 60, 114, 0.12);
border: 1px solid var(--momo-border-light);
border-radius: var(--momo-radius-md);
box-shadow: none;
overflow: hidden;
transition: transform .22s ease, box-shadow .22s ease;
}
.smoke-card:hover {
transform: translateY(-4px);
box-shadow: 0 16px 36px rgba(30, 60, 114, 0.18);
box-shadow: var(--momo-shadow-soft);
}
.status-badge {
border-radius: 999px;
border-radius: var(--momo-radius-sm);
padding: 6px 11px;
font-size: 12px;
font-weight: 700;
@@ -70,12 +71,13 @@
.status-critical { background: #fee2e2; color: #991b1b; }
.detail-box {
background: #f8fafc;
border-radius: 12px;
background: var(--momo-bg-paper);
border: 1px solid var(--momo-border-light);
border-radius: var(--momo-radius-sm);
padding: 12px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-family: var(--momo-font-mono);
font-size: 12px;
color: #334155;
color: var(--momo-text-secondary);
max-height: 160px;
overflow: auto;
white-space: pre-wrap;
@@ -90,13 +92,34 @@
.trend-dot {
height: 34px;
border-radius: 8px;
border-radius: var(--momo-radius-xs);
opacity: .92;
}
.trend-dot.status-ok { background: #22c55e; }
.trend-dot.status-warning { background: #f59e0b; }
.trend-dot.status-critical { background: #ef4444; }
.smoke-summary-table {
table-layout: fixed;
width: 100% !important;
min-width: 0 !important;
}
.smoke-summary-table th,
.smoke-summary-table td {
overflow-wrap: anywhere;
padding-left: 0.35rem;
padding-right: 0.35rem;
white-space: normal;
}
@media (max-width: 520px) {
.smoke-summary-table th,
.smoke-summary-table td {
font-size: 0.78rem;
}
}
</style>
{% endblock %}
@@ -106,15 +129,15 @@
<div>
<span class="smoke-pill mb-3"><i class="fas fa-robot"></i> FOUR-AGENT CONTROL PLANE</span>
<h1 class="fw-bold mb-2">AI 自動化 Smoke Dashboard</h1>
<p class="mb-0 text-white-50">快速確認 EventRouter、AutoHeal、NemoTron、OpenClaw 與 ElephantAlpha 的閉環狀態。</p>
<p class="mb-0 text-muted">快速確認 EventRouter、AutoHeal、NemoTron、OpenClaw 與 ElephantAlpha 的閉環狀態。</p>
</div>
<div class="text-lg-end">
<div id="overallStatus" class="h4 fw-bold mb-2">讀取中...</div>
<div class="text-white-50">版本 {{ system_version }}</div>
<button id="refreshBtn" class="btn btn-light mt-3">
<div class="text-muted">版本 {{ system_version }}</div>
<button id="refreshBtn" class="btn btn-primary mt-3">
<i class="fas fa-sync-alt me-2"></i>重新檢查
</button>
<a class="btn btn-outline-light mt-3 ms-lg-2" href="/api/ai-automation/smoke/history/export">
<a class="btn btn-outline-primary mt-3 ms-lg-2" href="/api/ai-automation/smoke/history/export">
<i class="fas fa-file-export me-2"></i>匯出 JSONL
</a>
<button id="clearHistoryBtn" class="btn btn-outline-warning mt-3 ms-lg-2">
@@ -156,7 +179,7 @@
</div>
</div>
<div class="table-responsive">
<table class="table align-middle mb-0">
<table class="table align-middle mb-0 smoke-summary-table">
<thead>
<tr>
<th>日期</th>

View File

@@ -113,7 +113,7 @@
{# 群組 4: AI 中樞saffron #}
<div class="momo-nav-group">
<div class="momo-nav-group-title">AI 中樞</div>
<a class="momo-nav-link {% if _active_page in ['ai_recommend', 'ai_history', 'ai_intelligence'] %}is-active{% endif %}" href="/ai_recommend">
<a class="momo-nav-link {% if _active_page in ['ai_recommend', 'ai_history', 'ai_intelligence', 'pchome_crawler', 'price_comparison', 'trends'] %}is-active{% endif %}" href="/ai_recommend">
<span class="momo-nav-icon"><i class="fas fa-wand-magic-sparkles"></i></span>
<span class="momo-nav-label">AI 助手</span>
<span class="momo-nav-code">05</span>

View File

@@ -345,6 +345,7 @@
{% set _group_analytics = ['sales', 'daily_sales', 'monthly', 'growth'] %}
{% set _group_ops = ['vendor_stockout', 'auto_import', 'market_intel'] %}
{% set _group_ai = ['ai_recommend', 'ai_history', 'ai_intelligence',
'pchome_crawler', 'price_comparison', 'trends',
'obs_overview', 'obs_agent_orchestration', 'obs_business_intel',
'obs_host_health', 'obs_ai_calls', 'obs_budget',
'obs_promotion_review', 'obs_rag_queries', 'obs_quality_trend',

View File

@@ -1,6 +1,6 @@
{% extends "base.html" %}
{% extends "ewoooc_base.html" %}
{% block title %}PChome 爬蟲 - Momo Pro{% endblock %}
{% block title %}PChome 爬蟲 - EwoooC{% endblock %}
{% block content %}
<div class="container-fluid py-4">

View File

@@ -1,6 +1,6 @@
{% extends "base.html" %}
{% extends "ewoooc_base.html" %}
{% block title %}比價系統 - Momo Pro{% endblock %}
{% block title %}比價系統 - EwoooC{% endblock %}
{% block content %}
<div class="container-fluid py-4">

View File

@@ -1,6 +1,6 @@
{% extends "base.html" %}
{% extends "ewoooc_base.html" %}
{% block title %}趨勢資料 - WOOO TECH{% endblock %}
{% block title %}趨勢資料 - EwoooC{% endblock %}
{% block content %}
<div class="container-fluid py-4">