dashboard: externalize service URLs and network config (Sprint 03 config externalization)
Deploy Dashboard (Dev) / Backend Tests (push) Failing after 2m17s
Deploy Dashboard (Dev) / Frontend Tests (push) Failing after 3m34s
Deploy Dashboard (Dev) / Deploy to Dev (push) Has been skipped
Run Tests / Secret Detection (pull_request) Failing after 30s
Run Tests / Backend Tests (pull_request) Failing after 2m18s
Run Tests / Frontend Tests (pull_request) Failing after 18s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Gan, Jimmy
2026-05-03 18:28:05 +08:00
parent 59bdcf392c
commit 019fddc079
4 changed files with 60 additions and 11 deletions
+8 -6
View File
@@ -8,6 +8,8 @@ import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import config
logger = logging.getLogger(__name__)
# Email configuration from environment
@@ -64,7 +66,7 @@ Status: {task['status']}
Description:
{task.get('description', 'No description')}
View task: https://nas.jimmygan.com/?page=opc
View task: {config.DASHBOARD_URL}/?page=opc
"""
html_body = f"""
@@ -79,7 +81,7 @@ View task: https://nas.jimmygan.com/?page=opc
</table>
<p><strong>Description:</strong></p>
<p>{task.get('description', 'No description')}</p>
<p><a href="https://nas.jimmygan.com/?page=opc" style="background-color: #4F46E5; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px; display: inline-block;">View Task</a></p>
<p><a href="{config.DASHBOARD_URL}/?page=opc" style="background-color: #4F46E5; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px; display: inline-block;">View Task</a></p>
</body>
</html>
"""
@@ -107,7 +109,7 @@ Proposed Actions:
{actions_text}
Please review and approve in the OPC dashboard:
https://nas.jimmygan.com/?page=opc
{config.DASHBOARD_URL}/?page=opc
"""
html_body = f"""
@@ -122,7 +124,7 @@ https://nas.jimmygan.com/?page=opc
<ul>
{"".join([f"<li><strong>{action.get('type')}</strong>: {action.get('title', action.get('message', 'N/A'))}</li>" for action in actions])}
</ul>
<p><a href="https://nas.jimmygan.com/?page=opc" style="background-color: #4F46E5; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px; display: inline-block;">Review & Approve</a></p>
<p><a href="{config.DASHBOARD_URL}/?page=opc" style="background-color: #4F46E5; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px; display: inline-block;">Review & Approve</a></p>
</body>
</html>
"""
@@ -140,7 +142,7 @@ Agent: {agent_name}
Task: {task['title']}
Actions Executed: {actions_count}
View details: https://nas.jimmygan.com/?page=opc
View details: {config.DASHBOARD_URL}/?page=opc
"""
html_body = f"""
@@ -150,7 +152,7 @@ View details: https://nas.jimmygan.com/?page=opc
<p><strong>Agent:</strong> {agent_name}</p>
<p><strong>Task:</strong> {task['title']}</p>
<p><strong>Actions Executed:</strong> {actions_count}</p>
<p><a href="https://nas.jimmygan.com/?page=opc" style="background-color: #10B981; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px; display: inline-block;">View Details</a></p>
<p><a href="{config.DASHBOARD_URL}/?page=opc" style="background-color: #10B981; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px; display: inline-block;">View Details</a></p>
</body>
</html>
"""