📝 Update docs for V3
This commit is contained in:
@@ -92,6 +92,7 @@ Dashy has support for displaying dynamic content in the form of widgets. There a
|
||||
- [Widget Usage Guide](#widget-usage-guide)
|
||||
- [Continuous Updates](#continuous-updates)
|
||||
- [Proxying Requests](#proxying-requests)
|
||||
- [Handling Secrets](#handling-secrets)
|
||||
- [Setting Timeout](#setting-timeout)
|
||||
- [Adding Labels](#adding-labels)
|
||||
- [Ignoring Errors](#ignoring-errors)
|
||||
@@ -2856,6 +2857,32 @@ Vary: Origin
|
||||
|
||||
---
|
||||
|
||||
### Handling Secrets
|
||||
|
||||
Some widgets require you to pass potentially sensetive info such as API keys. The `conf.yml` is not ideal for this, as it's stored in plaintext.
|
||||
Instead, for secrets you should use environmental vairables.
|
||||
|
||||
You can do this, by setting the environmental variable name as the value, instead of the actual key, and then setting that env var in your container or local environment.
|
||||
|
||||
The key can be named whatever you like, but it must start with `VUE_APP_` (to be picked up by Vue). If you need to update any of these values, a rebuild is required (this can be done under the Config menu in the UI, or by running `yarn build` then restarting the container).
|
||||
|
||||
For more infomation about setting and managing your environmental variables, see [Management Docs --> Environmental Variables](/docs/management.md#passing-in-environmental-variables).
|
||||
|
||||
For example:
|
||||
|
||||
```yaml
|
||||
- type: weather
|
||||
options:
|
||||
apiKey: VUE_APP_WEATHER_TOKEN
|
||||
city: London
|
||||
units: metric
|
||||
hideDetails: true
|
||||
```
|
||||
|
||||
Then, set `VUE_APP_WEATHER_TOKEN='xxx'`
|
||||
|
||||
---
|
||||
|
||||
### Setting Timeout
|
||||
|
||||
If the endpoint you are requesting data from is slow to respond, you may see a timeout error in the console. This can easily be fixed by specifying the `timeout` property on the offending widget. This should be an integer value, in milliseconds. By default timeout is `2500` ms (2½ seconds).
|
||||
|
||||
Reference in New Issue
Block a user