From 869a5993e84f3e77f38c055f4e1cfc495f7e1a5c Mon Sep 17 00:00:00 2001 From: Lissy93 Date: Sat, 2 Jul 2022 22:29:06 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Adds=20docs=20for=20widget=20lab?= =?UTF-8?q?els=20(#769)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/widgets.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/widgets.md b/docs/widgets.md index 11557f77..8c55dca5 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -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.