This repository contains the necessary tools and guidelines for creating and managing dashboard templates for the TagoIO platform. Dashboard templates allow users to quickly set up pre-configured dashboards for specific use cases.
The project follows this folder structure:
./templates/: This directory contains the dashboard templates../dashboard/template-name/: This directory should be named with the dashboard template name.
./src/: This directory contains the validation and generation scripts../src/schema/: This directory contains the JSON schemas for the templates.
Manifests are JSONC files that describe the details of each template. They are essential for ensuring that the template is correctly identified and processed by the TagoIO platform.
- Images
- Logo: Expected dimension
443x160
- Logo: Expected dimension
- Manifest File:
manifest.jsonc - Template Config File:
standard/template-config.jsonc - Structure File:
standard/structure.json
Here's an example of a manifest.jsonc file for a dashboard template:
Here's an example of a template-config.jsonc file for a dashboard template:
{
"$schema": "../../../../src/schema/dashboard-template-config.json",
"use_mock": true,
"type": "standard",
"setup": {
"devices": [
{
"id": "60888a20ea380c001298a45d",
"name": "Chicago Bus",
"description": "Chicago Bus Device"
}
]
}
}-
Create a new folder:
- Navigate to
./templates/dashboard/and create a new folder named after your dashboard template.
- Navigate to
-
Create the manifest file:
- Inside this folder, create a
manifest.jsoncfile. Follow the structure defined indashboard-template.json.
- Inside this folder, create a
-
Create a standard folder:
- Inside your template folder, create a folder with dashboard type
standardorblueprint.
- Inside your template folder, create a folder with dashboard type
-
Create template files:
-
Inside the standard/blueprint folder, create a
structure.jsonfile containing the dashboard structure. -
Create a
template-config.jsoncfile following the structure defined indashboard-template-config.json.NOTE: The
template-config.jsoncandstructure.jsonfiles can be exported directly from an existing TagoIO dashboard.
Navigate toadmin.tago.io> select theDashboard>Settings>Distribute>Download the file.
-
-
Add a description:
- Create a
description.mdfile in your template folder with a detailed description of the template.
- Create a
-
Add assets:
- Create an
assetsfolder in your template folder. - Add a
logo.pngfile to the assets folder.
- Create an
-
Create a new branch:
- Create a new branch for your template.
-
Add your template:
- Follow the instructions above to add your template.
-
Run these commands to validate your changes:
- Validate your template files:
npm start validate
- Generate template database:
npm start generate
- Make sure all commands execute successfully without errors before submitting your PR. This helps maintain code quality and ensures all documentation is up to date.
-
Commit your changes:
- Commit your changes and open a pull request for review.
-
Review and feedback:
- Wait for the Pull Request to be reviewed. You may need to make some changes based on the feedback you receive.
For more detailed information, please refer to the examples provided in the repository and the schema files located in the ./src/schema/ directory.
{ "$schema": "../../../src/schema/dashboard-template.json", "name": "Chicago Bus", "images": { "logo": "./assets/logo.png" }, "structure": { "standard": "./standard/structure.json" }, "manifest": { "standard": "./standard/template-config.jsonc" }, "description": "./description.md" }