diff --git a/docs/configuring.md b/docs/configuring.md index 2e4f681c..82bf82d1 100644 --- a/docs/configuring.md +++ b/docs/configuring.md @@ -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)** diff --git a/docs/widgets.md b/docs/widgets.md index 20334b4d..3c005c49 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -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. diff --git a/src/utils/ConfigSchema.json b/src/utils/ConfigSchema.json index 0168b4dd..626034b7 100644 --- a/src/utils/ConfigSchema.json +++ b/src/utils/ConfigSchema.json @@ -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",