Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Luzmo Viewer

No security coverage Drupal 9–11
View on drupal.org

This module allows you to embed Luzmo dashboards into your Drupal site using a custom field. You can configure authentication and choose whether to use remote or local Javascript libraries for displaying the dashboards.

This module intend to add a custom field that allow users to display Luzmo dashboard ID using javascript embed API.

Features

The module allow content editor to embed dashboard.
Dashboard can be displayed using integration key and token but site builder can also use embed tokens to display the dashboards.

Post-Installation

Module settings

Once installed go to /admin/config/system/luzmo-settings and change settings.

You'll need to fill:
- authkey: with your Luzmo API key
- authtoken: with your token API key
- luzmo.js location: define the location of the Luzmo embed library .js file. Default use remote version of the library.
- Luzmo App Server: you can change here the url of the Luzmo app server, default is https://app.luzmo.com/

The Account settings for logged-in or anonymous users allow you define user information required for authorisation.
It is only required if you need to request an authorisation.

Luzmo configuration

Create an integration on Luzmo ( https://app.luzmo.com/integrations ).
Select the dashboard you want to be embedded on drupal.
At the end of the process get the key & token.

You can still add dashboard later, just do not re-generate key and token.

Field creation

After that, create a Luzmo viewer field on your entity.
There is no settings for the form widget.
In the display you can set if formatter need to request an authorisation.

Additional Requirements

The module require Luzmo embed web component. You can use it remotely or localy https://socket.dev/npm/package/@luzmo/embed

If you decide to request an authorization , please make sure that users/suborganisations will have permissions to access the data.

Additional Information

Field cache

When authorisation is request, field use a per user cache with the max-age set to the authorisation inactivity interval time.

How can I alter cache?

Use drupal preprocess to alter cache contexts, ex:


/**
 * Implements hook_preprocess_HOOK().
 */
function hook_preprocess_field(&$variables) {
  // conditions
  foreach ($variables["items"] as &$items) {
    $items['content']["#cache"]["contexts"][] = 'cookies:luzmoFilters';
  }
}

I want to alter authorisation

Module implement a custom hook that allow you alter the authorisation before it's requested.
Example, it can allow to pre-fill dashboard filters.

Module implemant a hook: hook_luzmo_viewer_dashboard_javascript_authorisation_alter that can be called in module or theme.

Example:
I want to alter dashboard filters

/**
 * Alter authorisation settings to add filters based on cookie.
 *
 * {@see hook_luzmo_viewer_dashboard_javascript_authorisation_alter}.
 */
function hook_luzmo_viewer_dashboard_javascript_authorisation_alter(&$authorizationSettings, $dashboard_id) {
  $luzmoFilters = Drupal::request()->cookies->get('luzmoFilters');
  if (!empty($luzmoFilters)) {
    $luzmoFilters = json_decode($luzmoFilters, TRUE);
    foreach ($luzmoFilters as $filter_dashboard_id => $filters) {
      if ($filter_dashboard_id == $dashboard_id) {
        $authorizationSettings['filters'] = $filters;
      }
    }
  }
}

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Nov 2025
Latest release
3 weeks ago
Releases (12 mo)
5 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.1.2 Stable 9–11 Aug 6, 2026
1.1.x-dev Dev 9–11 Aug 5, 2026
1.1.1 Stable 9–11 Apr 9, 2026
1.1.0 Stable 9–11 Apr 7, 2026
1.0.0 Stable 9–11 Nov 6, 2025