Dashboards
Build dashboards for your team in the panel, with charts, tables, statistics and forms fed by your own HTTP functions.
A dashboard is a page in the panel made of components. Each component loads JSON from a URL, usually an HTTP function, and renders it as a chart, a table, a statistic or a form. Dashboards are the quickest way to give business users KPIs and reports without building a separate admin app.

Create a dashboard
{
"name": "Blog overview",
"icon": "insights",
"components": [
{"name": "Daily views", "url": "https://api.example.com/api/fn-execute/stats/views", "type": "line", "ratio": "2/2"},
{"name": "Published posts", "url": "https://api.example.com/api/fn-execute/stats/posts", "type": "statistic", "ratio": "1/1"}
]
}| Field | Description |
|---|---|
name | Required. Shown in the panel's dashboard list. |
icon | A Material icon name. |
components[].name | Title of the component. |
components[].url | URL that returns the component's data with a GET request. |
components[].type | How the data is rendered. |
components[].ratio | Size on the grid, such as 1/1 or 2/2 (default). |
Create dashboards in the panel or with POST /dashboard (dashboard:create). Manage them with GET, PUT and DELETE on /dashboard/:id.
Component types and data
Charts
Types: line, bar, radar, pie, doughnut, polarArea, bubble, scatter. The data follows Chart.js:
export function views() {
return {
title: "Daily views",
options: {legend: {display: true}, responsive: true},
labels: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
datasets: [{data: [120, 190, 170, 240, 310, 280, 350], label: "Views"}],
legend: true
};
}pie, doughnut and polarArea take labels and a data array instead of datasets. bubble and scatter take points such as {"x": 10, "y": 5, "r": 8} in their datasets.
Statistic
A single number with an optional change indicator:
export function posts() {
return {title: "Published posts", value: 42, difference: 12, icon: "article", iconBg: "#36369c", iconColor: "white"};
}difference is shown as a percentage, green when positive and red when negative.
Table
export function topAuthors() {
return {
title: "Top authors",
data: [
{name: "Ada Lovelace", posts: 12},
{name: "Alan Turing", posts: 9}
],
displayedColumns: ["name", "posts"]
};
}When displayedColumns is left out, the keys of the first row are used.
Card
A small form that sends its values to a URL, useful for operational actions such as "resend invoice":
{
"title": "Resend invoice",
"description": "Send the invoice email of an order again.",
"inputs": [{"key": "orderId", "type": "string", "value": "", "title": "Order id"}],
"button": {"color": "primary", "target": "https://api.example.com/api/fn-execute/invoices/resend", "method": "post", "title": "Send"}
}Securing dashboard endpoints
The panel calls component URLs with the logged-in identity's token. Protect the functions behind them with authenticate: ["IDENTITY"] so that only your team can load the data:
triggers:
views:
type: http
active: true
options:
method: Get
path: /stats/views
authenticate: [IDENTITY]Tips
- Pre-aggregate expensive numbers on a schedule and store them in a bucket. Dashboard functions then only read the result.
- Keep one function per dashboard and one handler per component.
- Give business users
DashboardReadOnlyAccessand access only to what the dashboards need.