feat(web): implement telemetry dashboard with data visualization
Add a comprehensive telemetry dashboard page featuring real-time system statistics and metric visualization using recharts. - Integrate recharts for area and bar chart rendering - Implement TelemetryAPI client for stats, discovery, and chart data - Add dashboard UI with stat cards and responsive charts - Remove legacy nginx sub_filter proxy configuration in favor of direct API communication to telemetry.imrnes.team
This commit is contained in:
@@ -21,64 +21,6 @@ server {
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
# ── Telemetry Dashboard Proxy (orange VPS via Tailscale) ──────────────
|
||||
# Telemetry UI SPA assets (fingerprinted by Vite, cache aggressively)
|
||||
location /telemetry/assets/ {
|
||||
proxy_pass http://100.96.248.86:8181/assets/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# Telemetry API calls (query proxy + target management)
|
||||
location /telemetry/proxy/ {
|
||||
proxy_pass http://100.96.248.86:8181/proxy/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_connect_timeout 5s;
|
||||
proxy_send_timeout 35s;
|
||||
proxy_read_timeout 35s;
|
||||
}
|
||||
|
||||
location /telemetry/api/ {
|
||||
proxy_pass http://100.96.248.86:8181/api/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_connect_timeout 5s;
|
||||
proxy_send_timeout 10s;
|
||||
proxy_read_timeout 10s;
|
||||
}
|
||||
|
||||
# Telemetry SPA — proxy to orange VPS, rewrite root-relative paths to /telemetry/ prefix
|
||||
location /telemetry/ {
|
||||
proxy_pass http://100.96.248.86:8181/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_connect_timeout 5s;
|
||||
proxy_send_timeout 35s;
|
||||
proxy_read_timeout 35s;
|
||||
|
||||
# Rewrite root-relative paths (<script src="/", href="/", fetch("/")) to /telemetry/ prefix
|
||||
sub_filter_once off;
|
||||
sub_filter 'src="/' 'src="/telemetry/';
|
||||
sub_filter 'href="/' 'href="/telemetry/';
|
||||
sub_filter "url('/" "url('/telemetry/";
|
||||
sub_filter 'fetch("/' "fetch(\"/telemetry/";
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user