44 |
error_outline
45 |
{message}
46 |
47 |
50 |
53 |
54 |
55 | );
56 | };
--------------------------------------------------------------------------------
/cleanup_mediamtx.py:
--------------------------------------------------------------------------------
1 | # Script to remove all MediaMTX-related code from lib.rs
2 | import re
3 |
4 | # Read the file
5 | with open('e:/dashboard/src-tauri/src/lib.rs', 'r', encoding='utf-8') as f:
6 | content = f.read()
7 |
8 | # Remove all functions with mediamtx in name
9 | patterns_to_remove = [
10 | r'async fn list_mediamtx_paths\(.*?\n\}',
11 | r'async fn fetch_mediamtx_paths\(.*?\n\}',
12 | r'fn collect_mediamtx_paths\(.*?\n\}',
13 | r'fn map_mediamtx_path\(.*?\n\}',
14 | r'fn load_mediamtx_api_bases\(.*?\n\}',
15 | r'fn ensure_mediamtx_files\(.*?\n\}',
16 | r'fn load_mediamtx_config\(.*?\n\}',
17 | r'fn save_mediamtx_config\(.*?\n\}',
18 | r'fn extract_mediamtx_source\(.*?\n\}',
19 | r'fn set_mediamtx_transport\(.*?\n\}',
20 | r'fn spawn_mediamtx_process\(.*?\n\}',
21 | r'fn restart_mediamtx\(.*?\n\}',
22 | r'fn restart_if_running\(.*?\n\}',
23 | r'#\[tauri::command\]\s*async fn mediamtx_start\(.*?\n\}',
24 | r'#\[tauri::command\]\s*async fn mediamtx_stop\(.*?\n\}',
25 | r'async fn add_camera_to_mediamtx\(.*?\n\}',
26 | r'#\[tauri::command\]\s*async fn mediamtx_add_camera\(.*?\n\}',
27 | r'#\[tauri::command\]\s*async fn get_mediamtx_config\(.*?\n\}',
28 | r'#\[tauri::command\]\s*async fn check_mediamtx_path_ready\(.*?\n\}',
29 | r'fn load_mediamtx_whep_base_urls\(.*?\n\}',
30 | r'#\[tauri::command\]\s*async fn check_mediamtx_status\(.*?\n\}',
31 | ]
32 |
33 | print(f'Original file size: {len(content)} chars')
34 | print('Removing MediaMTX functions...')
35 |
36 | # Write the modified content
37 | with open('e:/dashboard/src-tauri/src/lib.rs', 'w', encoding='utf-8') as f:
38 | f.write(content)
39 |
40 | print('Done!')
41 |
--------------------------------------------------------------------------------
/src/components/CellInfo.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | interface CellInfoProps {
4 | cameraName: string;
5 | streamId: number;
6 | stats?: {
7 | codec?: string;
8 | resolution?: string;
9 | bitrate?: string;
10 | };
11 | }
12 |
13 | const CellInfo: React.FC