Dynamic dashboard panels¶
Dynamic Dashboard Panels creates dashboard cards backed by administrator-supplied database queries. A panel can render a pie, bar, column, donut, grid, heat map, or single-value result for assigned users.
Open General Administration, locate General System Administration Settings, and select Dynamic Dashboard Panels.
Danger
The Query is stored and later executed against TEKControl data. The editor does not test, parse, parameterize, limit, or safety-check it. Only an authorized database and application specialist should create or change a panel query.
Configure panel details¶
| Field | Purpose |
|---|---|
| Name | Required dashboard title. |
| Description | Explains the metric, scope, and interpretation. |
| Chart Type | PIE, BAR, COLUMN, DONUT, GRID, HEAT, or SINGLE VALUE. |
| Module | Corporate or a supported TEKControl module that controls placement. |
| Query | Required database query with approved scope and date tokens. |
| X / Y Axis Title | Chart labels used by applicable renderers. |
| Grid Columns | Comma-separated headings corresponding by position to Grid query columns. |
| Display Post Selection | Shows the dashboard Post filter; the query must use the post token for it to affect results. |
Name, a real Module, Chart Type, Query, and at least one assignment are required.
Use supported query tokens¶
The dashboard replaces these exact, case-sensitive tokens before execution:
| Token | Replacement |
|---|---|
$ClientSiteRestriction$ |
Permission-aware restriction for the selected client and site using the expected ss.ClientId and ss.SiteId aliases. |
$PostId$ |
Selected post identifier. |
$FromDate$ |
Start of the selected dashboard date range. |
$Todate$ |
End of the selected dashboard date range. Note the lowercase d in date. |
Always include the client/site restriction in a form appropriate for the query. Assignments control who can see a panel; they are not a substitute for row-level data restriction inside the query.
Use read-only queries only. Do not include data-modification statements, credentials, secrets, unrestricted personal data, or unbounded joins. The form provides no Preview or Test action, so validate the query in an approved non-production environment with a read-only account and representative permissions.
Return the expected columns¶
| Chart type | Expected result shape |
|---|---|
| Pie / Bar / Donut / Heat | Column 1 is a category label; column 2 is an integer value. |
| Column | Column 1 and column 2 must be numeric X and Y values. |
| Grid | Each returned column maps by position to one comma-separated Grid Columns heading. |
| Single Value | First row column 1 is the displayed value; column 2 is its title. |
Unexpected nulls, nonnumeric values, missing columns, or a mismatch between Grid Columns and the query can produce a blank panel, missing cells, or rendering errors. A query can also be logically wrong while rendering successfully.
Assign visibility¶
Choose one or more clients, client accounts, regions, branches, or sites. Assignments are additive and determine which users can receive the panel, subject to module and dashboard permissions.
Saving an existing panel deletes all prior permission rows and recreates them from the current selections. The panel record is saved first, so an assignment failure can leave its query updated with incomplete visibility.
Test with an ordinary user in every intended scope and with a user just outside that scope. Confirm both panel visibility and data isolation.
Delete a panel¶
Delete requires confirmation and marks the panel as deleted rather than physically removing it. The action does not provide an Undo in this dialog.
Before deletion, capture the query, display settings, assignments, owner, and replacement. Prefer validating a replacement panel with limited assignments before retiring the current one.
Performance and security checklist¶
- Apply restrictive client, site, date, and post predicates.
- Return only the columns and rows needed by the renderer.
- Avoid large scans, Cartesian joins, per-row functions on indexed fields, and unlimited history.
- Verify execution with worst-case authorized scope.
- Confirm data types and empty-result behavior.
- Review query changes as code and retain a rollback copy.
- Monitor database and dashboard performance after release.