📝 Adds docs for widget labels (#769)

This commit is contained in:
Lissy93 2022-07-02 22:29:06 +01:00
parent eff49995b9
commit 869a5993e8
1 changed files with 27 additions and 0 deletions

View File

@ -80,6 +80,7 @@ Dashy has support for displaying dynamic content in the form of widgets. There a
- [Continuous Updates](#continuous-updates)
- [Proxying Requests](#proxying-requests)
- [Setting Timeout](#setting-timeout)
- [Adding Labels](#adding-labels)
- [Ignoring Errors](#ignoring-errors)
- [Custom CSS Styling](#widget-styling)
- [Customizing Charts](#customizing-charts)
@ -2265,6 +2266,32 @@ For example:
---
### Adding Labels
If you have multiple widgets of the same type in a single section, it may not be clear what each one is. To overcome this, you can add a custom label to any given widget, using the `label` property.
For example:
```yaml
- name: CPU Usage
icon: fas fa-tachometer
widgets:
- type: gl-current-cpu
label: Meida Server
options:
hostname: http://media-server.lan:61208
- type: gl-current-cpu
label: Firewall
options:
hostname: http://firewall.lan:61208
- type: gl-current-cpu
label: File Sync Server
options:
hostname: http://file-sync.lan:61208
```
---
### Ignoring Errors
When there's an error fetching or displaying a widgets data, then it will be highlighted in yellow, and a message displayed on the UI.