Dashboards and widgets
Build dashboards and widgets, bind data without entity IDs, and share, report on and export dashboards.
Dashboards
A dashboard has states (pages), layouts of widgets per state, entity aliases (which devices or assets a widget shows), filters, and settings (title, toolbar, colours). Open Dashboards, create one, then Edit mode to add widgets.
Assign a dashboard to customers (Manage assigned customers) so their users can open it, or make it the default dashboard of a device or asset profile so it opens from the entity's details.
Bind data without entity IDs
Dashboards that must work on another server (a package from the catalogue, a copy for a second campus) must not point at fixed entity IDs. Use aliases that find entities at run time:
| Alias filter | Use for |
|---|---|
| Device type / Asset type | All devices or assets of a profile (Water Level Unit) |
| Entity name | Name pattern (PLANT-AHU-%) |
| Relations query | Children of the selected building or tank |
| Entity from dashboard state | The entity the user drilled into |
The catalogue and the contributor workspace reject dashboards whose aliases use Single entity or Entity list with stored IDs, because those IDs do not exist on another server.
Widget library
Resources > Widgets library lists the widget bundles. System bundles come with the platform; tenant bundles are your own or come from packages (nexus_water, nexus_bms, nexus_smartcampus). A widget type has HTML, CSS and JavaScript, a settings form and data keys. Edit a copy, not the original, so a package update does not overwrite your changes.
Widgets that call nexus-services (reports, bulk control, tank configuration) need the service URL and an API key in their settings; the package installers fill them. When you install such a widget alone from the catalogue, set them in the widget's advanced settings.
Showing data honestly
- Show when a value was measured, not only the value.
- Distinguish offline (device inactive), unknown (never reported), stale and out of range. In the Water package the rule chain writes
dataQuality(VALID,OUT_OF_RANGE,STALE) andtankStatus=OFFLINE; the tank grid labels stale and out-of-range readings, and a tank without a reading shows--, never 0 %. - Data from the package simulators looks like real data. The packages do not mark simulated devices yet, so keep simulated devices out of operator dashboards (separate customer or naming) until they are replaced.
- Do not fill gaps with invented values. A chart with a gap is correct; a flat line through an outage is not.
Reports (PDF, customer users, public links)
The Water reports (tank level and volume trend, availability, network relationships, threshold events, abnormal change, device health, alert lifecycle) come from nexus-services at /api/water/v1/reports, as CSV, XLSX, JSON or PDF (A4 landscape table with title, period, generation time and an "Aniston Nexus" footer).
- Customer users signed in to Aniston Nexus may run these reports. The service limits every report to the tanks, devices and assets assigned to the user's own customer; asking for another customer is refused (403). The customer permission
allowReports=falseturns it off for one customer,WATER_REPORTS_CUSTOMERACCESS=falsefor all. Tenant administrators see the whole tenant as before. Scheduled reports and their history stay with tenant administrators. - Public report links (off by default,
NEXUS_REPORTS_PUBLIC_LINKS_ENABLED=trueand a secret of at least 32 bytes inNEXUS_REPORTS_PUBLIC_LINKS_SECRET): a tenant administrator, or a customer user for their own customer, creates a signed link to one report with a fixed period and an expiry of at most 30 days (POST /api/water/v1/reports/links). Anyone with the link opens the report without a login at/api/water/v1/public/reports/<token>until it expires or is revoked (DELETE /api/water/v1/reports/links/<id>). Treat a link like a password: whoever has it sees that report.
Parameters, columns and examples: nexus-services/src/main/java/com/aniston/nexus/services/reports/README.md.
Dashboard as PDF or PNG
The PDF button in the dashboard toolbar (all users, also customer users in view mode) saves what the dashboard shows now: the open state, the current time window and the data on screen.
- Export as PDF (A4): A4 landscape pages with the dashboard title and time window at the top and an "Aniston Nexus" footer with the export time and page number. A long dashboard is split over several pages, where possible between widgets rather than through one.
- Export as PNG image: the whole dashboard as one image with the same header and footer.
The page is captured in the browser, so charts, gauges, cards, tables and SVG widgets come out as on screen. Limits: the 3D campus map (WebGL) usually comes out empty, and map tiles from servers without CORS headers are left out. Pages are images, so the PDF text cannot be selected. Widgets with their own time window show that window; the header shows the dashboard's.
Dynamic Y axis
Time series charts can let the Y axis follow the data: in the widget's Y axis settings (Y axes > ⚙) turn on Dynamic range, optionally with a Padding in % of the range (default 5 %). Min and max then follow the values that are shown, also after zooming in on the chart or hiding a series in the legend, instead of fixed limits or a scale from 0 (bar charts). Fixed scale limits are ignored while it is on. It is off by default, so existing widgets do not change.
Exporting and versioning
Export a dashboard as JSON (⋮ > Export) to keep it, or upload it to the contributor workspace to share it on the catalogue. Reusable dashboards belong in the repository content library (Database/), where they are versioned with the code.
The home Overview shows a section per enabled domain and can be customised: see Home overview.