Écrire et vérifier un modèle › Construire des applications de données › Fleet ops centre

Écrire et vérifier un modèle › Construire des applications de données

Cette page n’est pas encore traduite : voici la version anglaise.

Fleet ops centre

Forty field gateways on a map, their battery and temperature, and the alerts to acknowledge. The screen is live, or replayed hour by hour over the last seven days. It does the job of the anfra Grab Ops Command app.

archec new my-app --kind data-app --template fleet-ops-centre
archec ui preview my-app/main.arche --serve

What it shows#

  • A filter bar: a site.
  • The replay card: play, pause, a step back or on, a slider over the seven days, the speed. Live shows every row again.
  • Four tiles: the gateways, the lowest battery against REQ-BATTERY, the hottest enclosure, the critical alerts.
  • Where they are: each gateway at its longitude and latitude, a colour per site. A click filters the screen.
  • The battery by site, day by day.
  • The alerts queue, latest first, each with acknowledge and escalate.

The replay#

replay week "Last 7 days" { date last 7d } moves a time over the seven days before the latest row. Every element of the screen then reads the rows up to that time, from the start of the span. The tiles, the map and the queue are the fleet as it was then.

The data#

  • data/telemetry.csv: an hour a row for each gateway: at, device, site, lat, lon, battery, temp, state.
  • data/alerts.csv: an alert a row: alert, at, device, site, severity, kind, value.

In a real project, the telemetry is archec live's (from live), and the alerts come from its monitors.

Limits#

  • The map is the points alone: no outline of the land under them.
  • The replay steps an hour at a time over seven days, a day at a time over more than a month.

The model is lib/data-apps/fleet-ops-centre/main.arche, and the gallery lists the other templates.