From 852755ee1d722ec0d85979a53e97080ed245d6ef Mon Sep 17 00:00:00 2001 From: ccbikai Date: Sun, 18 May 2025 20:50:56 +0800 Subject: [PATCH] feat: enhance globe visualization with traffic arcs Adds real-time visualization of traffic flow between user locations and data centers on the 3D globe: - Implements arc animations for traffic visualization - Adjusts globe colors and atmosphere for better visibility - Adds data center (colo) location mapping - Centers initial view on user's current location - Improves mobile responsiveness and layout - Adds cleanup handling for globe resources Performance and UX improvements: - Optimizes globe rotation speed and controls - Updates time picker layout with logical grouping - Enhances responsive design for dashboard components --- app/components/dashboard/TimePicker.vue | 7 ++- app/components/dashboard/realtime/Chart.vue | 2 +- app/components/dashboard/realtime/Globe.vue | 64 +++++++++++++++++---- app/components/dashboard/realtime/Index.vue | 2 +- app/components/dashboard/realtime/Logs.vue | 7 ++- app/components/spark-ui/AnimatedList.vue | 6 ++ app/utils/events.ts | 3 + package.json | 1 + public/colos.json | 1 + scripts/build-colo.js | 19 ++++++ server/api/location.ts | 7 +++ server/api/logs/events.ts | 5 ++ 12 files changed, 108 insertions(+), 16 deletions(-) create mode 100644 app/utils/events.ts create mode 100644 public/colos.json create mode 100644 scripts/build-colo.js create mode 100644 server/api/location.ts diff --git a/app/components/dashboard/TimePicker.vue b/app/components/dashboard/TimePicker.vue index d67b9f5..7214ca1 100644 --- a/app/components/dashboard/TimePicker.vue +++ b/app/components/dashboard/TimePicker.vue @@ -65,9 +65,6 @@ onBeforeMount(() => { - - {{ $t('dashboard.time_picker.today') }} - {{ $t('dashboard.time_picker.last_5m') }} @@ -89,6 +86,10 @@ onBeforeMount(() => { {{ $t('dashboard.time_picker.last_24h') }} + + + {{ $t('dashboard.time_picker.today') }} + diff --git a/app/components/dashboard/realtime/Chart.vue b/app/components/dashboard/realtime/Chart.vue index 5f50f1a..6c9d126 100644 --- a/app/components/dashboard/realtime/Chart.vue +++ b/app/components/dashboard/realtime/Chart.vue @@ -30,7 +30,7 @@ onMounted(async () => {