Analytics · Dashboard viewer
Renders a configured dashboard — a custom component panel, the built-in data-quality panel, or an embedded external URL — with a date-range selector, refresh, print and export actions.
| Area | Analytics |
| Routes | analytics · analytics.dashboards · analytics.dashboards.show |
| Centre modules | analytics |
| Staff levels | per module-analytics ability; each dashboard is additionally scoped to staff roles |
| Models | dashboard · dashboard-component · dashboard-config |
| UI label | title.header.dashboards.show / menu.navbar.analytics |
| Coverage | 4 use cases · 1 happy · 4 failure |
How it works
The same panel-resolution logic as the desktop: isValidDashboard checks the panel against enums/dashboard-panels and the controller branches on isCustomDashboard / isExternalUrlDashboard. Dashboards are injected into the navbar from auth.dashboards, so each user sees only the dashboards attached to their role. nf-dashboard/header provides print, refresh and exportDashboard. For external-URL dashboards the page header is hidden so the embed fills the viewport.
Use cases
Why someone opens this (4)
- A CRM manager reviewing registration quality for the last quarter.
- An owner opening an embedded BI dashboard without a second login.
- Printing or exporting a dashboard for a management meeting.
- Refreshing figures after a large import.
Path map
flowchart LR F(["Dashboard viewer"]):::feat F --> H1["Custom dashboard reviewed"]:::ok F -.-> X1["Unknown panel type"]:::bad F -.-> X2["External dashboard not found"]:::bad F -.-> X3["No dashboards for the role"]:::bad F -.-> X4["Module disabled"]:::bad classDef feat fill:#8a6b10,stroke:#8a6b10,color:#ffffff,font-weight:bold classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13
Happy paths
Custom dashboard reviewed
- User picks a dashboard from the Analytics menu.
- The panel resolves as
custom, its filters are seeded andsettle()runs.- Charts and KPI tiles render for the default date range.
- The user adjusts the range, refreshes and then prints or exports.
Failure paths
Unknown panel type
Cause —
dashboard.panelnot in the enum.What happens —
isValidDashboardfalse; nothing renders and no message explains why.
External dashboard not found
Cause — Configured URL wrong or provider down.
What happens —
dashboard.error.not-found-external-dashboard.
No dashboards for the role
Cause — None attached to the user’s role.
What happens — The Analytics menu section is empty.
Module disabled
Cause — Analytics module off for the centre.
What happens —
module-analytics#canAccessblocks the route.
QA checklist
Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.
- ✅ Custom dashboard reviewed
- ⛔ Unknown panel type
- ⛔ External dashboard not found
- ⛔ No dashboards for the role
- ⛔ Module disabled
Implementation
app/routes/analytics/dashboards/show.jsapp/controllers/analytics/dashboards/show.jsapp/components/nf-dashboard.jsapp/components/nf-dashboard/header.jsapp/components/nf-dashboard/config.jsapp/mixins/dashboard-mixin.jsapp/abilities/module-analytics.js
Translation keys (4)
Key English title.header.dashboards.showDashboard menu.navbar.analyticsAnalytics dashboard.error.not-found-external-dashboardExternal dashboard not found error_browser_iframeYour browser does not support iframes
Related
- Same area — CRM dashboard panels (overview, channels, demographic) · Data-quality dashboard
- Shares data with — Dashboard configuration · Desktop (home dashboard) · Staff member editor (levels, scope, API token)
- Behind the same module — CRM dashboard panels (overview, channels, demographic) · Data-quality dashboard · Dashboard configuration
Generated from doc/feature-inventory.json · id analytics-dashboard-viewer · commit 276788ca6