feat(platform): add online statistics summary
This commit is contained in:
@@ -745,6 +745,7 @@ func TestHandlerHistoryMileageQualityOps(t *testing.T) {
|
||||
{"/api/history/raw-frames?protocol=GB32960&vin=LB9A32A24R0LS1426&limit=1&includeFields=true", "plate"},
|
||||
{"/api/mileage/summary?limit=10", "totalMileageKm"},
|
||||
{"/api/mileage/daily?limit=10", "dailyMileageKm"},
|
||||
{"/api/statistics/online-summary?limit=10", "onlineRatePercent"},
|
||||
{"/api/quality/summary?limit=10", "issueVehicleCount"},
|
||||
{"/api/quality/issues?limit=10", "sourceEndpoint"},
|
||||
{"/api/ops/health", "linkHealth"},
|
||||
@@ -894,12 +895,12 @@ func TestHandlerQualityNotificationPlan(t *testing.T) {
|
||||
|
||||
func TestHandlerOpsHealthIncludesVehicleServiceRuntime(t *testing.T) {
|
||||
handler := NewHandler(NewServiceWithRuntime(NewMockStore(), RuntimeInfo{
|
||||
RequestTimeoutMs: 1500,
|
||||
AMapWebJSConfigured: true,
|
||||
AMapSecurityProxyEnabled: true,
|
||||
AMapSecurityCodeExposed: false,
|
||||
AMapSecurityServiceHost: "/_AMapService",
|
||||
PlatformRelease: "platform-20260704153005",
|
||||
RequestTimeoutMs: 1500,
|
||||
AMapWebJSConfigured: true,
|
||||
AMapSecurityProxyEnabled: true,
|
||||
AMapSecurityCodeExposed: false,
|
||||
AMapSecurityServiceHost: "/_AMapService",
|
||||
PlatformRelease: "platform-20260704153005",
|
||||
}))
|
||||
rec := httptest.NewRecorder()
|
||||
req := httptest.NewRequest(http.MethodGet, "/api/ops/health", nil)
|
||||
|
||||
Reference in New Issue
Block a user