ajax_dashboard
AJAX Dashboard is a simple dashboard construction module, which allows developers to build AJAX-powered dashboards using a YAML configuration and a selection of plugins.
Using this module requires some code editing, and familiarity with YAML at minimum. This will enable you to embed Views into a dashboard, and use the Constant plugin to generate simple HTML pages. More advanced developers may also use the @AJAXDashboardButton annotation plugin to create custom single page applications.
How to Use it
Out-of-the-box Features
The module provides, out of the box, the AJAXDashboard class for generating dashboards, and a plugin system for custom controls (AJAXDashboardControl) and buttons (AJAXDashboardButton). The module also provides two hooks for pre- and post-processing of configuration, to ease programmatic construction of a dashboard.
Dashboard Controls
- Button List: List of buttons
Dashboard Buttons
- Constant: Constant HTML Markup
- Processed Text: Render HTML in a text format.
- Render Array: Drupal Render Array (combine with an entity view builder to render entities)
- Redirect: Instead of showing content, redirect to a URL.
AJAX Dashboard Views
This module allows you to embed Views into a dashboard.
AJAX Dashboard Entity Dashboard
This module allows you to embed a configurable dashboard onto any entity. It will appear as a field in the "Manage Display" area for your entity, and the dashboard will be passed the following parameters:
- entity: Entity ID
- entity_type: Entity Type
- bundle: Entity Bundle
- user: ID of the current user
The Flashpoint Education module (as of 2.0.0-alpha1) uses an Entity Dashboard and the post-processing hook to create course navigation for its courses.
Developer Examples
The AJAX Dashboard Example module comes with example user dashboards that demonstrates every template, styling, and plugin feature of the module. This module is especially helpful as a reference for setting up configurations.
Future Development
We have a few features in mind for this module's future, and would be glad to discuss further in the issue queue:
- Embed entities into a dashboard
- Create a "dashboard editor" so that site builders may create dashboards.
- Convert controls to use an annotation plugin, so that a developer may programmatically create buttons.
- Provide extended documentation and examples of adding extra AJAX commands in order to add additional features into a dashboard
- Generate AJAX Dashboard links in a view, such that a view could allow you to generate a list of links to reports. For example, a table of user rankings, in which you can click to AJAX-load a list of activities that went into the ranking.