Commit Graph

19 Commits

Author SHA1 Message Date
a3feacb842 Reduce page side margins by 50%
px-4 (1rem) to px-2 (0.5rem) to give more horizontal space for
long host names.
2026-02-23 00:36:58 +07:00
94169b8d65 Add S3, GCS, and B2 regional storage endpoints
Remove DigitalOcean. Add B2, 7 S3 endpoints across all continents
(Cape Town, London, Bahrain, Tokyo, Sydney, Oregon, São Paulo), and
4 GCS locational endpoints (Iowa, Belgium, Singapore, Sydney) for
cross-provider latency comparison.
2026-02-23 00:35:07 +07:00
14764a79ad Color-code per-host avg label and clamp graph Y-axis to 1000ms
The avg latency text below each host's big number is now color-coded
using the same thresholds as the main figure. The sparkline Y-axis
stays 0-1000ms — values between 1000-1500ms pin to the top of the
chart but still show their real value in the latency display.
2026-02-23 00:26:00 +07:00
55fb63bec1 Increase request timeout and max latency to 1500ms
For high-latency connections, 1000ms was too aggressive and caused
false unreachable readings. Bump to 1500ms and add a 1500 tick to
the Y-axis.
2026-02-23 00:23:43 +07:00
0e84b973ce Add make dev target for running the dev server 2026-02-23 00:17:36 +07:00
b23da0797e Add gateway auto-detection and rename to Local CPE
Local CPE (192.168.100.1) is always monitored. On startup, probe
192.168.1.1, 192.168.0.1, 192.168.8.1, and 10.0.0.1 in parallel
and add whichever responds first as "Local Gateway".
2026-02-23 00:05:48 +07:00
83bd23945c Add Anthropic and OpenAI API endpoints to monitoring targets
Reorder host list: datavi.be first, then LLM APIs, then cloud
providers (AWS, GCP, Azure), then CDN/hosting, then GitHub.
2026-02-23 00:01:50 +07:00
cb8d47d7aa Enable prettier prose wrapping for markdown
Add proseWrap: "always" to .prettierrc so markdown prose is
hard-wrapped at 80 columns.
2026-02-23 00:00:25 +07:00
818accc454 Bring repo up to REPO_POLICIES.md standards
- Add prettier (4-space indents) and reformat all files
- Add Makefile with test/lint/fmt/fmt-check/check/docker targets
- Add MIT LICENSE file
- Add REPO_POLICIES.md
- Fix Dockerfile: listen on 8080 with PORT env var via envsubst
- Restructure README.md with all required sections
- Set up pre-commit hook (make check)
- Update .prettierignore, .gitignore, .dockerignore
2026-02-22 15:59:10 +01:00
ca403e68d1 Pin Dockerfile base images to SHA256 digests
Mutable tags on Docker Hub enable RCE during builds.
Pin to exact digests with version/date comments for auditability.
2026-02-22 14:55:55 +01:00
e106dd5332 Update README with Docker, health indicator, and WAN/local docs 2026-02-22 14:51:55 +01:00
fa3d50393e Add Dockerfile with nginx for static serving
- Multi-stage build: node:22-alpine builds, nginx:stable-alpine serves
- RFC1918 set_real_ip_from for 10/8, 172.16/12, 192.168/16
- X-Forwarded-For real_ip_header with recursive resolution
- Access log to stdout, error log to stderr (Docker best practice)
- Immutable cache headers for hashed static assets
- SPA fallback via try_files
2026-02-22 14:51:33 +01:00
651c86211d Refactor to classes and implement UI improvements
Architecture:
- Extract AppState and HostState classes (no global mutable state)
- Extract SparklineRenderer class with static methods
- Extract CONFIG object for all constants
- Break monolithic functions into focused helpers

Features:
- Clickable service URLs (open in new tab, existing styling)
- Health status box above summary (red DEGRADED if >half unreachable)
- Local Gateway separated into bottom group
- Local Gateway excluded from WAN min/max/avg summary stats
- Pause stops probes but history keeps scrolling (blank gaps, no false outage)
- WAN_HOSTS / LOCAL_HOSTS separation with indexed rendering
2026-02-22 14:51:06 +01:00
3069b4692d Add fixed axes, color-coded lines, summary stats, and >1000ms clamping
- Fixed Y-axis (0-1000ms) with tick labels
- Fixed X-axis showing seconds ago (-0s to -300s)
- Sparkline segments color-coded by latency value
- Summary line showing reachable count, min/max/avg across hosts
- Latencies >1000ms now clamped to unreachable/timeout
- Canvas height increased to 80px for axis labels
2026-01-31 14:22:35 -08:00
ed602fdb5f Fix timing: use performance.now() instead of Resource Timing API
Resource Timing entries are added asynchronously after fetch resolves,
causing a race condition. The simple performance.now() around fetch
gives accurate latency measurements without this issue.
2026-01-31 13:58:18 -08:00
0038f23460 Always check timing data even on fetch error (4xx/5xx)
Resource Timing API records latency even for error responses.
Now we check for timing data regardless of fetch success/failure,
only reporting unreachable if no timing data is available.
2026-01-30 22:25:32 -08:00
8be7002ad9 Fix latency measurement and chart direction
- Use Resource Timing API for accurate network latency instead of
  performance.now() around fetch (fixes ~600ms measurement error)
- Chart now shows latest sample at right edge, growing left
- Reduce request timeout from 5000ms to 1000ms
2026-01-30 22:23:35 -08:00
83d9d15b6c Change update interval to 2000ms and add play/pause button
- Update interval changed from 250ms to 2000ms (150 history points)
- Add large play/pause toggle button in header
- Show running/paused status indicator
- Pause stops all network requests, resume restarts them
2026-01-30 22:20:19 -08:00
65cc2014c6 Initial implementation of NetWatch network latency monitor
SPA for real-time latency monitoring to 10 internet hosts:
- 250ms update interval with 300s history sparkline graphs
- Color-coded latency display (green <50ms to red >500ms)
- HEAD request timing with no-cors mode for cross-origin support
- Built with Vite + Tailwind CSS v4, all dependencies bundled
- Designed for static bucket deployment
2026-01-29 21:32:19 -08:00