Commit Graph

3 Commits

Author SHA1 Message Date
Colonel Panic 3bf6f6a5bd dashboard: env-configurable port, plus ?demo=1 preview mode
flockyou.py: bind host and listen port both read from env
(FLOCKYOU_HOST / FLOCKYOU_PORT, defaulting to 0.0.0.0:5000). Was a
hardcoded :5000 before, which collides with other Flask projects on
the same dev box — now you can run side-by-side instances or bind
to localhost only.

index.html: ?demo=1 query param seeds the dashboard with eight
synthetic detections covering every visual state (live wildcard-probe,
addr2, addr1 with/without GPS, replay/FLASH with/without GPS, replay/
RAM × 2) and reveals the device command toolbar so the polished layout
is browseable without flashing real hardware. Purely a front-end mock
— the command buttons still hit the real /api/flock/* endpoints, so
clicking them in demo mode produces the actual "device not connected"
error toast (that error path is itself part of the UI worth seeing).
Self-contained: a single initDemoMode() function gated on the query
param, called once at the end of DOMContentLoaded.

api/README.md: both features documented under Quick start so they're
discoverable without reading the source.
2026-05-10 20:44:34 -04:00
Colonel Panic 8741ea0c21 docs: bring both READMEs in line with the host-command UI
api/README.md was significantly out of date — referenced a non-existent
`app.py`, predated the entire `/api/flock/*` command-protocol surface,
and described the dashboard as if it only ingested live JSON.

Full rewrite:

  - Quick start with the actual entrypoint (python flockyou.py)
  - Sniffer command bar — table of all five buttons, what each one
    sends to the device, what comes back, and the canonical
    post-wardrive workflow (Pull Prev → Clear Prev) both as button
    clicks and as curl invocations
  - How replay detections are handled — no GPS temporal matching,
    no overwrite of fresher live data, FLASH / RAM badges, the
    flock_replay_complete socket event with its ok / count / reason
    payload
  - Toast colour semantics (green / blue / yellow / red)
  - Endpoint reference table covering Sniffer, GPS, detections,
    export/import, OUI lookup
  - Socket.IO event table — both directions, with the new
    flock_replay_complete / flock_status / flock_clear / flock_error
    events from this branch
  - JSON wire-format samples for live, replay, status, version,
    replay_complete, clear, error
  - Troubleshooting section keyed on the new failure modes (no_file /
    crc_mismatch / device timeout / two-tabs-pulling-at-once)

The root README's "Running Flask" subsection gains a "Dashboard
command bar" block describing the same five buttons + replay visual
treatment, with a cross-reference to api/README.md for the full
detail.
2026-05-10 20:35:10 -04:00
Colonel Panic 0ee2e6c664 Add files via upload 2025-08-23 14:47:43 -04:00