1. Template Guidelines
  2. Dashboards

Template Guidelines

Dashboards

Explains dashboards, their pages and the dashboard-enabled actions that feed them data.

Dashboards show analytics and other information from your templates. The Stubber Platform has two dashboard types:

  • paged_html: a collection of custom HTML pages, where each page reads JSON data from a stub action as its datasource
  • component_grid: a grid of components of a certain type (charts, markdown, images and so on), where each component reads JSON data from a stub action as its datasource
NOTE

Dashboards are a new feature, and only paged_html is available at the moment.

Features

  • Custom look and feel, with your own branding in HTML and CSS.
  • Creative, LLM-composed visualizations of dashboards and analytics.
  • Authentication through the org's Stubber SSO login by default, so only users on the Stubber Platform can view the pages.

Use cases

  • A responsive, themed dashboard showing metrics for a specific template's use case.
  • A dashboard that aggregates data across several templates.

Datasources

A dashboard page reads its data from a stub action. Only actions marked as dashboard actions can be used as datasources. To enable one, set dashboard in the action's action_meta and specify the data it returns:

        {
  "dashboard": {
    "enable": true,
    "return_data": {
      "sales": "~~stubpost.tasks.build_data.payload.result"
    }
  }
}

      

What return_data resolves to is exactly what the page receives. The action can gather its data from stubs or from StubberDB.

Building a paged_html dashboard

  1. Put the dashboard actions in the _manage context. Dashboard data usually spans the whole template, and the _manage context stub makes a convenient datasource stub.
  2. Define a dashboard action that retrieves the data and sets return_data.
  3. Create a new dashboard, or use an existing one, and add a page. A new page needs the datasource's stubref and action.
  4. Build the page's HTML, which fetches the data from the datasource.
  5. Check the draft page, then publish the dashboard once you're happy with it.

You can view a draft page at:

https://dashboards.stubber.com/[org domain]/[dashboard_name]/[page_name]?_branch=draft

Designing pages with Flowpilot

Flowpilot has a dashboard design agent that knows how dashboards work. Ask Flowpilot to build or change a page, and point it at the datasource. You can:

  • give it a website to use as design inspiration for colors and logos, for example Design a dashboard to follow the look and feel of www.stubber.com; it browses the site and extracts the styling itself
  • refer it to an existing dashboard or page to change
  • work with it over several turns until the design is right
  • let it be creative with the visualization, for example by using three.js
  • ask it to publish the dashboard when you're satisfied, or to publish straight away after designing it