Dashboards
A dashboard is a grid of widgets, each bound to a data source (a layer, form submissions, an IoT stream, annotations, work orders, or analysis results), arranged on a react-grid-layout canvas. Position is stored once on the dashboard (not per-widget), so layout edits are atomic.
Core data model
dashboards:
| Column | Purpose |
|---|---|
name, slug | Display name plus a unique-per-org slug. |
layout_json | Grid positions for react-grid-layout, the single source of truth for atomic PATCH updates. |
filters_json | Shared filters that cascade across widgets. |
theme_json | Colour overrides (future theme customisation). |
shared_publicly | Boolean. |
share_token | Unique unauthenticated read-only token; partial unique index on WHERE NOT NULL. |
archived | Soft-delete. |
dashboard_widgets:
| Column | Purpose |
|---|---|
dashboard_id | Back-reference. |
widget_type | KPI / GAUGE / CHART / MAP / LIST / TABLE / NOTE / INDICATOR. |
data_source_json | What data to pull: layer / query / IoT ref. |
config_json | Type-specific: chart type (line / bar / pie / area), colours, chart-specific filters. |
Widget rows do not store position; that's inferred from dashboard.layout_json[i].
Operational dashboards: widgets bind to layers, IoT streams, survey results, and work orders in one view. Real-time refresh via WebSocket for IoT widgets. Grid layout with KPI card, gauge, chart (line / bar / pie / area), map, list, table, indicator, rich-text note.
Why it matters
Dashboards answer the question every utility ops director asks in the second sales meeting: "so what does my Monday-morning view look like?"
Once you've loaded an asset register and started capturing field data, dashboards make Stratumly a daily operational tool, not a quarterly survey deliverable.
Sample scenario:
Shift dashboard on a wall monitor: pit tonnage, plant uptime, active-blast zones, open safety observations, all live. A drone flies the pit daily at sunrise; by 07:30 the new volumetric diff is available and the headline moved-material KPI updates on the dashboard.
Daily users
- Ops supervisor: primary daytime view; shared live maps, alert triage.
- Exec / director: embedded dashboards, mobile read-only, public-share link to council partners.
- GIS analyst / Asset manager: authors widgets and templates.
Grid layout
react-grid-layoutfor drag-resizable widgets.- Position lives on
dashboards.layout_json(one source of truth, atomic PATCH). - Widgets only carry what's in the cell, not geometry.
Widget kit
| Widget | Purpose |
|---|---|
| KPI card | Single metric ("active pipe breaks: 7"). |
| Gauge | Progress meter (0–100). |
| Chart | Line / bar / pie / area via Recharts. |
| Map | Embedded 2D map showing a feature layer or submission pins. |
| List | Tabular display of records (submissions, features). |
| Table | Sortable, filterable table. |
| Note | Rich-text annotation. |
| Indicator | Up / down / neutral status light. |
Data sources
- Layers: query features, aggregate (count, sum, mean, min, max), filter by attribute or spatial.
- Form submissions: count by template, by status; aggregate values.
- IoT streams: live sensor readings (pressure, temperature, flow) via WebSocket; historical graphs.
- Annotations: defect counts, severity distribution from the
annotationsfeature class. - Work orders: open / closed / in-progress counts.
Graceful degradation
If a widget's data source becomes inaccessible (e.g. the tenant downgrades from a tier that included a feature back to one that doesn't), the widget renders a "Widget unavailable: data source inaccessible" card and retains its config so it auto-recovers if the tier is restored.
Cross-widget filters
- Click a bar-chart segment → map and table update.
- Filters cascade via
dashboards.filters_json.
Real-time refresh
- WebSocket for IoT widgets: values update live as readings arrive.
Sharing
- Public share with expiring tokens.
- Embeddable as iframe: drop a live operational view into a council partner's portal without giving them logins.
- Per-organisation branding (logo, colour).
Templates
- Pre-built per-industry dashboards (water utility ops, rail asset health, highways condition).
Per-dashboard ACLs (today: every org member can CRUD), version history / rollback, and a UI for managing org-level basemap entitlements on dashboard map widgets are on our roadmap.
How it links to the others
- Dashboards ← Map. Map widgets reuse the basemap registry and render the same feature layers.
- Dashboards ← Forms / Submissions. Submission counts, completion rates, aggregated values.
- Dashboards ← Analysis. Analysis results (output layers, aggregate statistics) become KPI cards or charts. A buffer-intersect run becomes "7 pipes at-risk of flooding" without copy-paste.
- Dashboards ← Annotations. Defect-count and severity widgets pull from the
annotationsfeature class. - Dashboards ← IoT / Twins. Live sensor values, simulation output (risk score, affected elements) feed widgets.
- Dashboards → Compliance. Public-share links and embedded iframes are how ops directors give council partners and regulators a live view without giving them logins.