perf(monitor): aggregate realtime workspace
This commit is contained in:
@@ -55,6 +55,7 @@ func (h *Handler) routes() {
|
||||
h.mux.HandleFunc("GET /api/ops/source-readiness", h.handleSourceReadiness)
|
||||
h.mux.HandleFunc("GET /api/v2/monitor/summary", h.handleMonitorSummary)
|
||||
h.mux.HandleFunc("GET /api/v2/monitor/map", h.handleMonitorMap)
|
||||
h.mux.HandleFunc("GET /api/v2/monitor/workspace", h.handleMonitorWorkspace)
|
||||
h.mux.HandleFunc("GET /api/v2/vehicles/{vin}/profile", h.handleVehicleProfile)
|
||||
h.mux.HandleFunc("PUT /api/v2/vehicles/{vin}/profile", h.handleSaveVehicleProfile)
|
||||
h.mux.HandleFunc("GET /api/v2/vehicles/{vin}/telemetry/latest", h.handleLatestTelemetry)
|
||||
@@ -307,6 +308,11 @@ func (h *Handler) handleMonitorMap(w http.ResponseWriter, r *http.Request) {
|
||||
h.write(w, r, data, err)
|
||||
}
|
||||
|
||||
func (h *Handler) handleMonitorWorkspace(w http.ResponseWriter, r *http.Request) {
|
||||
data, err := h.service.MonitorWorkspace(r.Context(), r.URL.Query())
|
||||
h.write(w, r, data, err)
|
||||
}
|
||||
|
||||
func (h *Handler) handleDashboardSummary(w http.ResponseWriter, r *http.Request) {
|
||||
data, err := h.service.DashboardSummary(r.Context())
|
||||
h.write(w, r, data, err)
|
||||
|
||||
Reference in New Issue
Block a user