🗃️ Adds widget request timeout to schema and docs

This commit is contained in:
Alicia Sykes 2022-03-27 21:22:26 +01:00
parent 979a776b68
commit 6220f9b7f8
3 changed files with 23 additions and 0 deletions

View File

@ -222,6 +222,7 @@ For more info, see the **[Authentication Docs](/docs/authentication.md)**
**`options`** | `object` | _Optional_ | Some widgets accept either optional or required additional options. Again, see the [Widget Docs](/docs/widgets.md) for full list of options
**`updateInterval`** | `number` | _Optional_ | You can keep a widget constantly updated by specifying an update interval, in seconds. See [Continuous Updates Docs](/docs/widgets.md#continuous-updates) for more info
**`useProxy`** | `boolean` | _Optional_ | Some widgets make API requests to services that are not CORS-enabled. For these instances, you will need to route requests through a proxy, Dashy has a built in CORS-proxy, which you can use by setting this option to `true`. Defaults to `false`. See the [Proxying Requests Docs](/docs/widgets.md#proxying-requests) for more info
**`timeout`** | `number` | _Optional_ | Request timeout in milliseconds, defaults to ½ a second (`500`)
**[⬆️ Back to Top](#configuring)**

View File

@ -1289,6 +1289,7 @@ All Glance's based widgets require a `hostname`. All other parameters are option
**`apiVersion`** | `string` | _Optional_ | Specify an API version, defaults to V `3`. Note that support for older versions is limited
**`limit`** | `number` | _Optional_ | For widgets that show a time-series chart, optionally limit the number of data points returned. A higher number will show more historical results, but will take longer to load. A value between 300 - 800 is usually optimal
Note that if auth is configured, requests must be proxied with `useProxy: true`
##### Info
- **CORS**: 🟢 Enabled
- **Auth**: 🟠 Optional
@ -1726,6 +1727,12 @@ Vary: Origin
---
### Setting Timeout
Default timeout is ½ a second. This can be overridden with the `timeout` attribute on a widget, specified as an integer in milliseconds.
---
### Widget Styling
Like elsewhere in Dashy, all colours can be easily modified with CSS variables.

View File

@ -837,6 +837,21 @@
"type": "string",
"description": "The type of widget to use, see docs for supported options"
},
"updateInterval": {
"title": "Update Interval",
"type": "number",
"description": "Specified in seconds. If set, widget data will be re-retched at this interval to display up-to-date data"
},
"timeout": {
"title": "Timeout",
"type": "number",
"description": "Specified in milliseconds. If set, request will timeout after the specified interval. Defaults to 500/ half a sec"
},
"useProxy": {
"title": "Use Proxy?",
"type": "boolean",
"description": "If set to true, request will be proxied through the backend. Requires the Node server to be running"
},
"options": {
"title": "Widget Options",
"type": "object",