Update analytics to show hourly data and time
Fix an issue where historical analytics were not displaying correctly by changing the data fetch to hourly and updating the date format. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 7a657272-55ba-4a79-9a2e-f1ed9bc7a528 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 49cfc935-92d3-4961-b703-750d52c8bdc2 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/449cf7c4-c97a-45ae-8234-e5c5b8d6a84f/7a657272-55ba-4a79-9a2e-f1ed9bc7a528/37PFEyl
This commit is contained in:
parent
8b5cbb7650
commit
ede6378241
4
.replit
4
.replit
@ -22,6 +22,10 @@ externalPort = 3002
|
|||||||
localPort = 43803
|
localPort = 43803
|
||||||
externalPort = 3000
|
externalPort = 3000
|
||||||
|
|
||||||
|
[[ports]]
|
||||||
|
localPort = 45209
|
||||||
|
externalPort = 3001
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
PORT = "5000"
|
PORT = "5000"
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ export default function AnalyticsHistory() {
|
|||||||
|
|
||||||
// Fetch historical analytics (daily aggregations)
|
// Fetch historical analytics (daily aggregations)
|
||||||
const { data: analytics = [], isLoading } = useQuery<NetworkAnalytics[]>({
|
const { data: analytics = [], isLoading } = useQuery<NetworkAnalytics[]>({
|
||||||
queryKey: ["/api/analytics/recent", { days, hourly: false }],
|
queryKey: ["/api/analytics/recent", { days, hourly: true }],
|
||||||
refetchInterval: 60000, // Aggiorna ogni minuto
|
refetchInterval: 60000, // Aggiorna ogni minuto
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ export default function AnalyticsHistory() {
|
|||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
date: format(new Date(a.date), "dd/MM"),
|
date: format(new Date(a.date), "dd/MM HH:mm"),
|
||||||
fullDate: a.date,
|
fullDate: a.date,
|
||||||
totalPackets: a.totalPackets || 0,
|
totalPackets: a.totalPackets || 0,
|
||||||
normalPackets: a.normalPackets || 0,
|
normalPackets: a.normalPackets || 0,
|
||||||
|
|||||||
@ -63,6 +63,7 @@ The IDS employs a React-based frontend for real-time monitoring, detection visua
|
|||||||
- **Deploy**: Migration 005 + `./deployment/setup_analytics_timer.sh`
|
- **Deploy**: Migration 005 + `./deployment/setup_analytics_timer.sh`
|
||||||
- **Security Fix**: Rimosso hardcoded path, implementato wrapper script sicuro `run_analytics.sh` per esecuzioni manuali
|
- **Security Fix**: Rimosso hardcoded path, implementato wrapper script sicuro `run_analytics.sh` per esecuzioni manuali
|
||||||
- **Production-grade**: Credenziali gestite via systemd EnvironmentFile (automatico) o wrapper script (manuale)
|
- **Production-grade**: Credenziali gestite via systemd EnvironmentFile (automatico) o wrapper script (manuale)
|
||||||
|
- **Frontend Fix**: Analytics History ora usa dati orari (`hourly: true`) finché aggregazione daily non è schedulata
|
||||||
|
|
||||||
### 🌍 IP Geolocation Integration (22 Nov 2025 - 13:00)
|
### 🌍 IP Geolocation Integration (22 Nov 2025 - 13:00)
|
||||||
- **Feature**: Informazioni geografiche complete (paese, città, organizzazione, AS) per ogni IP
|
- **Feature**: Informazioni geografiche complete (paese, città, organizzazione, AS) per ogni IP
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user