Fix JavaScript UI and complete database table migration

- Update status page JavaScript to reset all fields to '-' on error
- Fix status page to not show 'Connected' when API returns error
- Update remaining database methods to use new live_routes_v4/v6 tables
- Fix GetStatsContext to count routes from both IPv4 and IPv6 tables
- Fix UpsertLiveRoute to insert into correct table based on IP version
- Fix DeleteLiveRoute to determine table from prefix IP version
This commit is contained in:
2025-07-28 22:39:01 +02:00
parent 3673264552
commit fc32090483
4 changed files with 354182 additions and 372 deletions

View File

@@ -251,7 +251,7 @@ func (s *Server) handleStats() http.HandlerFunc {
return
case err := <-errChan:
s.logger.Error("Failed to get database stats", "error", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
writeJSONError(w, http.StatusInternalServerError, err.Error())
return
case dbStats = <-statsChan: