General
Guides
Development
API
Charts
- Bar Chart
- Bar Chart (Discrete)
- Donut Chart
- Scatter Plot
- Simple Time Series
- Singlegraph
- Singlegraph Grid
- Standard Time Series
Text
- Comparison Jumbotron Singlestat
- Comparison Singlestat
- Comparison Summation Table
- Heading
- Jumbotron Singlestat
- Markdown
- Percentage Table
- Singlestat
- Summation Table
- Timer Stat
- Time-Shifted Jumbotron Singlestat
- Time-Shifted Singlestat
- Time-Shifted Summation Table
Layout
Extending Tessera
Extensions are Javascript code that extend the UI of Tessera, by
defining new dashboard items, transformations, or toolbar/context menu
actions. Extensions can be added to a build of Tessera by simply
dropping a .js
file in the js/extensions
folder and running
grunt
.
Dashboard Items
ds.register_dashboard_item(type, descriptor)
Registers a new dashboard item type.
Arguments
type
A string identifying the class of dashboard item.descriptor
An object which supplies the Javascript model type, data handler callback, rendering template, and editable properties.
Example
Below is an incomplete, made-up example. Every built-in dashboard item
type is set up using register_dashboard_item
, so you can look at all
the source files in
js/models/dashboard-items as examples
as well.
Transforms
Transforms are model objects implementing a transform()
method which
accepts a dashboard item and returns a new dashboard item to replace
it.
Actions
Actions are model objects that encapsulate an some execution that can be invoked from the UI. Actions can be rendered as buttons or menu items, and are registered globally in named lists which are used in various places in the UI.
An action can specify its display text, an icon, its callback function, and a variety of other display-related properties.
Action Registry
The global action registry is accessed through ds.actions
, which
supports the following functions.
ds.actions.register(category, action)
ds.actions.list(category)
ds.actions.get(category, name)
ds.actions.categories()
The following categories are pre-defined for various menus and button bars in the UI:
'new-item'
'edit-bar-section'
'edit-bar-row'
'edit-bar-cell'
'edit-bar-item'
'dashboard-queries'
'dashboard-list-actions'
'presentation-actions'
Example
Here’s an example which adds a “View Source…” menu item to the dashboard list, opening the dashboard’s API representation in a new browser window.