feat(video): base of video refactoring

This commit is contained in:
2026-06-18 02:23:25 +05:30
parent d7c4027328
commit c6894bfea0
20 changed files with 432 additions and 1412 deletions

View File

@@ -54,6 +54,6 @@ export const API_ROUTES = {
LIST: '/videos',
UPLOAD: '/biz/api/v1/upload',
STATUS: (id: string) => `/status/${id}`,
RESULTS: (id: string) => `/results/${id}`,
RESULTS: (id: string) => `/biz/api/v1/results/${id}/completed`,
},
} as const;

View File

@@ -6,9 +6,6 @@ export interface DetectionTypeConfig {
id: string;
label: string;
color: string;
countKey: string; // The key in summary object from API (e.g., unique_pothole)
listKey: string; // The key for the list of detections in DetectionData (e.g., pothole_list)
frameCountKey: string; // The key in per-frame count object (e.g., pothole)
}
export interface DetectionModeConfig {
@@ -22,65 +19,41 @@ export const DETECTION_TYPES: Record<string, DetectionTypeConfig> = {
id: 'pothole',
label: 'Pothole',
color: 'var(--chart-1)',
countKey: 'unique_pothole',
listKey: 'pothole_list',
frameCountKey: 'pothole',
},
defected_sign_board: {
id: 'defected_sign_board',
label: 'Defect Sign Board',
color: 'var(--chart-2)',
countKey: 'unique_defected_sign_board',
listKey: 'defected_sign_board_list',
frameCountKey: 'defected_sign_board',
},
road_crack: {
id: 'road_crack',
label: 'Road Crack',
color: 'var(--chart-3)',
countKey: 'unique_road_crack',
listKey: 'road_crack_list',
frameCountKey: 'road_crack',
},
damaged_road_marking: {
id: 'damaged_road_marking',
label: 'Damage Road Mark',
color: 'var(--chart-4)',
countKey: 'unique_damaged_road_marking',
listKey: 'damaged_road_marking_list',
frameCountKey: 'damaged_road_marking',
},
good_sign_board: {
id: 'good_sign_board',
label: 'Good Sign Board',
color: 'var(--chart-5)',
countKey: 'unique_good_sign_board',
listKey: 'good_sign_board_list',
frameCountKey: 'good_sign_board',
},
drain_issue: {
id: 'drain_issue',
label: 'Drain Issue',
color: 'var(--chart-6)',
countKey: 'unique_drain_issue',
listKey: 'drain_issue_list',
frameCountKey: 'drain_issue',
},
good_culvert: {
id: 'good_culvert',
label: 'Good Culvert',
color: 'var(--chart-5)',
countKey: 'unique_good_culvert',
listKey: 'good_culvert_list',
frameCountKey: 'good_culvert',
},
defective_culvert: {
id: 'defective_culvert',
label: 'Defective Culvert',
color: 'var(--chart-8)',
countKey: 'unique_defective_culvert',
listKey: 'defective_culvert_list',
frameCountKey: 'defective_culvert',
},
};