From c9e3851fc9d33927a08c7d21df8a5d9952ff2ea5 Mon Sep 17 00:00:00 2001 From: MAHaines Date: Mon, 14 Jul 2025 10:57:15 -0500 Subject: [PATCH] Create complete dashboard HTML template --- services/dashboard/src/views/dashboard.ejs | 476 +++++++++++++++++++++ 1 file changed, 476 insertions(+) create mode 100644 services/dashboard/src/views/dashboard.ejs diff --git a/services/dashboard/src/views/dashboard.ejs b/services/dashboard/src/views/dashboard.ejs new file mode 100644 index 0000000..de643a3 --- /dev/null +++ b/services/dashboard/src/views/dashboard.ejs @@ -0,0 +1,476 @@ + + + + + + Discord Voice Translator - Dashboard + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+

🎤 Voice Translator Dashboard

+

Real-time monitoring of Discord voice translation activity

+
+
+
+ System Online +
+ Last updated: <%= moment().format('HH:mm:ss') %> +
+
+
+
+ + +
+
+
+
+ +

<%= data.systemStats.totalTranscriptions %>

+

Total Transcriptions

+ +<%= data.systemStats.todayTranscriptions %> today +
+
+
+ +
+
+
+ +

+ <%= Math.round(data.systemStats.totalSpeakingTime / 3600 * 10) / 10 %>h +

+

Speaking Time

+ + Avg: <%= Math.round(data.systemStats.avgTranscriptionTime) %>ms + +
+
+
+ +
+
+
+ +

<%= data.systemStats.activeConnections %>

+

Active Sessions

+ Voice channels +
+
+
+ +
+
+
+ +

+ <%= Object.keys(data.systemStats.languageBreakdown).length %> +

+

Languages Detected

+ Last 7 days +
+
+
+
+ + +
+ +
+
+
Language Distribution
+ +
+
+ + +
+
+
Performance Metrics
+ +
+
+
+ + +
+ +
+
+
Recent Activity
+
+ <% data.recentActivity.forEach(activity => { %> +
+
+
+ <%= activity.speaker_nickname %> + + <%= activity.languageInfo.flag %> <%= activity.languageInfo.name %> + +
+ <%= activity.channel_name %> + <%= activity.timeAgo %> + <%= Math.round(activity.duration_seconds * 10) / 10 %>s +
+
+ "<%= activity.transcriptPreview %>" +
+
+
+ + <%= activity.processing_time_ms %>ms + +
+
+
+ <% }); %> +
+
+
+ + +
+
+
Top Users (7 days)
+
+ <% data.userActivity.forEach((user, index) => { %> +
+
+
+ <% if (index === 0) { %><% } %> + <%= user.speaker_nickname %> +
+ + <%= user.transcription_count %> recordings +
+ <%= Math.round(user.total_speaking_time / 60 * 10) / 10 %> min +
+
+ <%= user.last_activity_ago %> +
+ <% }); %> +
+
+
+
+ + +
+
+
+
System Information
+
+
+
Services Status
+
    +
  • Recorder Service
  • +
  • Audio Processor
  • +
  • Whisper Service (GPU)
  • +
  • Translation Service
  • +
  • Transcriber Service
  • +
+
+
+
Performance
+
    +
  • Avg Transcription: <%= Math.round(data.systemStats.avgTranscriptionTime) %>ms
  • +
  • Avg Translation: <%= Math.round(data.systemStats.avgTranslationTime) %>ms
  • +
  • GPU Model: faster-whisper large-v2
  • +
  • Translation: Local NLLB + Google
  • +
+
+
+
Storage
+
    +
  • Database: PostgreSQL
  • +
  • Cache: Redis
  • +
  • Models: Cached locally
  • +
  • Audio: Auto-cleanup
  • +
+
+
+
+
+
+
+ + +
+ +
+ + + + + + +