feat(platform): harden telemetry pipeline and unify Semi UI workspaces

This commit is contained in:
lingniu
2026-07-18 00:26:36 +08:00
parent 65b4e4f055
commit 159c80b0ae
136 changed files with 21616 additions and 1785 deletions

View File

@@ -261,13 +261,14 @@ export interface HistoryMetricCatalog {
}
export interface MetricCatalog { metrics: MetricDefinition[]; asOf: string; }
export interface MetricValueMapping { value: string; label: string; description?: string; }
export interface MetricDefinition {
key: string; label: string; description: string; unit: string; category: string; valueType: 'numeric' | 'boolean';
protocols: string[]; sourceFields: Record<string, string>; searchable: boolean; chartable: boolean; alertable: boolean;
protocols: string[]; sourceFields: Record<string, string>; valueMappings?: MetricValueMapping[]; searchable: boolean; chartable: boolean; alertable: boolean;
}
export interface HistoryDataCategory { key: 'location' | 'raw' | 'mileage' | string; label: string; }
export interface HistoryMetricDefinition { key: string; label: string; unit: string; category: string; valueType: string; defaultVisible: boolean; }
export interface HistoryMetricDefinition { key: string; label: string; description?: string; unit: string; category: string; valueType: string; valueMappings?: MetricValueMapping[]; defaultVisible: boolean; }
export interface HistoryDataRow { id: string; vin: string; plate: string; protocol: string; deviceTime: string; serverTime: string; quality: string; qualityReason: string; evidenceId?: string; values: Record<string, unknown>; }
export interface HistoryDataSummary { resultRows: number; vehicleCount: number; sources: string[]; queryDurationMs: number; }
export interface HistoryDataResponse { category: string; columns: HistoryMetricDefinition[]; rows: HistoryDataRow[]; summary: HistoryDataSummary; total: number; limit: number; offset: number; asOf: string; }
@@ -447,6 +448,7 @@ export interface VehicleDetail {
export interface VehicleProfile {
vin: string;
brandName: string;
modelName: string;
vehicleType: string;
companyName: string;
@@ -465,6 +467,7 @@ export interface VehicleProfile {
}
export interface VehicleProfileInput {
brandName?: string;
modelName: string;
vehicleType: string;
companyName: string;
@@ -477,6 +480,7 @@ export interface VehicleProfileInput {
export interface VehicleProfileSyncItem {
vin: string;
brandName?: string;
modelName: string;
vehicleType: string;
companyName: string;
@@ -768,7 +772,7 @@ export interface RawFrameRow {
export interface LatestTelemetryCategory { key: string; label: string; count: number; }
export interface LatestTelemetryValue {
key: string; sourceField: string; label: string; description?: string; unit: string; category: string;
valueType: string; value: unknown; protocol: string; sourceEndpoint?: string; frameId: string;
valueType: string; value: unknown; displayValue?: string; protocol: string; sourceEndpoint?: string; frameId: string;
deviceTime: string; serverTime: string; quality: 'good' | 'stale' | 'warning'; qualityReason: string;
freshnessSeconds: number; dataDelaySeconds?: number;
}