How to view dashboard source
Open the YAML source of an existing dashboard to learn from examples and modify them. The Quick Start Guide introduces the same task with the Example Profile.
Before you start, you need:
- Profinity V2 installed and running.
- Access to a dashboard (component or profile dashboard).
- The Modify dashboards permission, which shows the pencil icon that opens the dashboard editor.
Open a component dashboard's source
- Select the component in the sidebar.
- Select the pencil (Edit Dashboard) icon in the menu at the right of the dashboard title bar. This opens the dashboard editor in DESIGN mode.
- Select the YAML tab to see the complete dashboard configuration.
Open a profile dashboard's source
A profile dashboard replaces the standard home page when Custom Home Dashboard is enabled in the profile settings. To find the setting, select ADMIN in the side menu, then Profile, and select the profile. How to Create a Profile Dashboard describes enabling the option.
With the option enabled:
- Go to the home page.
- Select the pencil (Edit Dashboard) icon in the menu at the right of the dashboard title bar.
- Select the YAML tab.
Copy and reuse a dashboard
- In the YAML tab, select all of the YAML.
- Copy it with Ctrl+C or Cmd+C.
- Paste it into a text editor to save it, or paste it into a new dashboard, component, or profile to use it as a template.
- Modify the pasted source to suit the new dashboard, then save it as the new dashboard.
Reading the YAML shows how components are organised, how data bindings are configured, how layout elements nest and how styling is applied. Copying a simple dashboard first and adding complexity in small, tested changes keeps a faulty change easy to find.
For more, refer to the Dashboard Development Guide, the Motor Controller Dashboard Example and the Component Reference.