Dashboards

Rapports et graphiques

Place de marchéContenu et documentsVersion 0.1.0manifest

À quoi elle sert ​

Store dashboards and widgets as data (KPI, bar, line, pie and table definitions) for a client to render. The package never runs a query and does not check that the models it names exist.

Ce que fait et ne fait pas le paquet ​

Dashboards and their widgets stored as data, for a UI to render. A dashboard has a title and an owner. A widget describes one tile with these fields: kind (kpi, bar, line, pie or table), model_name (the model to read, for example sale_order), measure_field (the field to aggregate; empty for count), aggregate (count or sum; sum needs a number or money measure_field), group_by (field to split by, for bar, line, pie and table; empty for a single kpi value), filter (a JSON object of field names to exact values, for example {"state":"paid"}; empty means all records) and position (order on the dashboard, lowest first). The package only stores the definition; it does not check that the model or fields exist and it computes nothing.

Modèles ​

dashboards_dashboard ​

A dashboard: a titled, ordered collection of widgets

Groupe de lecture: dashboards.user. Groupe d'écriture: dashboards.manager.

ChampTypeClasse de donnéesDonnées personnellesGroupeVu par les agentsDescription
titletextnonenondashboards.useren clairDashboard title, for example Sales overview
ownertextinternalouidashboards.usermasquéName of the person who owns the dashboard
descriptionlongtextnonenondashboards.useren clairWhat the dashboard shows and for whom
sharedboolnonenondashboards.useren clairWhether everyone with access to the Dashboards app sees it, or only the owner
positionnumbernonenondashboards.useren clairOrder among dashboards, lowest first

dashboards_widget ​

One tile on a dashboard, defined by what to read and how to aggregate it

Groupe de lecture: dashboards.user. Groupe d'écriture: dashboards.manager.

ChampTypeClasse de donnéesDonnées personnellesGroupeVu par les agentsDescription
dashboard_idref → dashboards_dashboardnonenondashboards.useren clairThe dashboard the widget is on
titletextnonenondashboards.useren clairTile title, for example Paid orders
kindselect (kpi, bar, line, pie, table)nonenondashboards.useren clairHow the tile is drawn: kpi, bar, line, pie, table
model_nametextnonenondashboards.useren clairModel the tile reads, for example sale_order
measure_fieldtextnonenondashboards.useren clairField to aggregate: a number or money field of the model; empty when counting
aggregateselect (count, sum)nonenondashboards.useren clairHow records are combined: count or sum
group_bytextnonenondashboards.useren clairField to split the result by (a select, ref or date field); empty for one value
filterlongtextnonenondashboards.useren clairJSON object of field names to exact values that records must match, for example {"state":"paid"}; empty means all records
positionnumbernonenondashboards.useren clairOrder of the tile on the dashboard, lowest first

Flux de travail ​

Cette application n'a aucune action de flux de travail ; les enregistrements sont créés et modifiés directement.

Groupes de permissions ​

Groupes utilisés par cette application :

  • dashboards.manager
  • dashboards.user

Étapes d'approbation ​

Aucune étape de cette application ne requiert d'approbation, hormis la suppression d'enregistrements.

Ce que les agents peuvent et ne peuvent pas faire ​

Un agent peut lire, rechercher, créer et modifier les enregistrements de cette application, et exécuter les actions qui ne requièrent pas d'approbation, dans les limites des groupes de permissions de son jeton.

Il ne peut que proposer ces étapes, qu'une personne doit approuver : dashboards_dashboard.delete, dashboards_widget.delete.

Les données personnelles sont masquées sous forme de jetons de substitution : dashboards_dashboard.owner.

Dépendances ​

Aucune.

Installation ​

Installez-la depuis l'application Customize (Place de marché), ou en ligne de commande :

bash
obop modules install-from dashboards

Nécessite une base de données et des droits d'administrateur.

Créer la vôtre ​

Le guide des modules montre comment sont écrites les applications de ce type