mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 08:32:09 +01:00
Enhances data handling and geographic mapping
Refactors dashboard to use actual metrics for country data, removing dummy data for improved accuracy. Integrates the country-code-lookup package for geographic mapping, adding comprehensive country coordinates. Increases performance and data validation across API endpoints and adjusts WordCloud component size for better visualization. Enhances session handling with improved validation logic, and updates configuration for allowed origins.
This commit is contained in:
@ -359,7 +359,7 @@ export function sessionMetrics(
|
||||
if (s.endTime) {
|
||||
const duration =
|
||||
(s.endTime.getTime() - s.startTime.getTime()) / (1000 * 60); // minutes
|
||||
|
||||
|
||||
// Sanity check: Only include sessions with reasonable durations (less than 24 hours)
|
||||
const MAX_REASONABLE_DURATION = 24 * 60; // 24 hours in minutes
|
||||
if (duration > 0 && duration < MAX_REASONABLE_DURATION) {
|
||||
|
||||
Reference in New Issue
Block a user