diff --git a/routes/admin_observability_routes.py b/routes/admin_observability_routes.py
index 25834af..07caf07 100644
--- a/routes/admin_observability_routes.py
+++ b/routes/admin_observability_routes.py
@@ -111,6 +111,7 @@ def ai_calls_dashboard():
return render_template(
'admin/ai_calls_dashboard.html',
+ active_page='obs_ai_calls',
hours=hours,
caller_filter=caller_filter,
provider_filter=provider_filter,
@@ -144,6 +145,7 @@ def ai_calls_dashboard():
except Exception as e:
return render_template(
'admin/ai_calls_dashboard.html',
+ active_page='obs_ai_calls',
hours=hours, caller_filter=caller_filter,
provider_filter=provider_filter,
summary={}, by_provider=[], recent=[], callers=[],
@@ -187,12 +189,14 @@ def promotion_review_list():
return render_template(
'admin/promotion_review.html',
+ active_page='obs_promotion_review',
episodes=episodes,
error=None,
)
except Exception as e:
return render_template(
'admin/promotion_review.html',
+ active_page='obs_promotion_review',
episodes=[],
error=f'查詢失敗: {type(e).__name__}: {str(e)[:200]}',
)
@@ -254,6 +258,7 @@ def quality_trend_dashboard():
return render_template(
'admin/quality_trend.html',
+ active_page='obs_quality_trend',
days=days,
trends=[(c, info) for c, info in sorted_trends],
recommendations=recommendations,
@@ -262,6 +267,7 @@ def quality_trend_dashboard():
except Exception as e:
return render_template(
'admin/quality_trend.html',
+ active_page='obs_quality_trend',
days=days, trends=[], recommendations=[],
error=f'查詢失敗: {type(e).__name__}: {str(e)[:200]}',
)
@@ -322,9 +328,9 @@ def budget_dashboard():
'updated_at': b[5].strftime('%Y-%m-%d %H:%M') if b[5] else '-',
})
- return render_template('admin/budget.html', rows=rows, error=None)
+ return render_template('admin/budget.html', active_page='obs_budget', rows=rows, error=None)
except Exception as e:
- return render_template('admin/budget.html', rows=[],
+ return render_template('admin/budget.html', active_page='obs_budget', rows=[],
error=f'查詢失敗: {type(e).__name__}: {str(e)[:200]}')
finally:
session.close()
@@ -408,6 +414,7 @@ def ppt_audit_history():
return render_template(
'admin/ppt_audit_history.html',
+ active_page='obs_ppt_audit',
files=files,
vision_enabled=vision_enabled,
error=error,
@@ -467,6 +474,7 @@ def host_health_dashboard():
return render_template(
'admin/host_health.html',
+ active_page='obs_host_health',
ollama_hosts=ollama_hosts,
mcp_status=mcp_status,
throttle_state=throttle_state,
diff --git a/templates/admin/ai_calls_dashboard.html b/templates/admin/ai_calls_dashboard.html
index 434ab02..2ab9103 100644
--- a/templates/admin/ai_calls_dashboard.html
+++ b/templates/admin/ai_calls_dashboard.html
@@ -1,15 +1,15 @@
{% extends "base.html" %}
-{% block title %}AI Calls Dashboard{% endblock %}
+{% block title %}AI 呼叫總覽{% endblock %}
{% block content %}
-
📊 AI Calls Dashboard
+ AI 呼叫總覽
過去 {{ hours }} 小時
{% if error %}
-
⚠️ {{ error }}
+ {{ error }}
{% endif %}
@@ -25,7 +25,7 @@