- shots.py crops to a region (clip) or to what one or more elements cover (element, pad), per-shot viewport; capture.py writes the published sizes to src/data/screenshots.json so the page reserves the right space. - anonymize.py no longer empties secrets that netOrk compares with each other (Wi-Fi keys on an SSID against the key read from the access point). Emptying them invented passphrase "drift" that never existed; a keyed hash keeps equal equal, reverses nothing, and its key lives for one run. - scripts/check/site.py checks the built site in both languages at four widths: sideways overflow, one h1, images with alt and size, console errors, requests to other origins, links to unknown routes, old-URL redirects, language detection, and word counts against the budgets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.5 KiB
Markdown
30 lines
1.5 KiB
Markdown
# Demo instance for screenshots
|
|
|
|
The website shows real netOrk screens, taken from a local copy of a production
|
|
database with every hostname, domain, address, MAC and name replaced.
|
|
|
|
```
|
|
pg_dump -Fc ... > netork.dump # on the production host, by hand
|
|
scripts/demo/up.sh restore netork.dump # fresh local DB + anonymize.py
|
|
scripts/demo/up.sh start # API :8000, UI http://127.0.0.1:5173
|
|
scripts/screenshots/capture.py --list-devices
|
|
scripts/screenshots/capture.py --var ap=<id> --var switch=<id> --var server=<id>
|
|
```
|
|
|
|
Log in as `netork` / `netork-demo`.
|
|
|
|
- Only the API and the UI run. There is no worker, no beat and no Redis, so
|
|
nothing polls or reaches a device. Stored credentials are emptied, and the
|
|
encryption key is random per start.
|
|
- Secrets are emptied — except the ones netOrk compares with each other (Wi-Fi
|
|
keys on an SSID against the key read from the access point). Those become a
|
|
keyed hash, so equal stays equal and the drift view shows the real state
|
|
instead of invented deviations. The key exists only for one run.
|
|
- The mapping from real to demo names lives outside the repo in
|
|
`~/.config/netork-screenshots/demo-map.json`, because it lists the real names.
|
|
Domains become `example.demo`.
|
|
- `anonymize.py` ends with a leak report. Read it before taking screenshots,
|
|
and look at every image before committing it.
|
|
- The dump file itself holds production data: keep it out of the repo and
|
|
delete it when done.
|