fix(dashboard): don't reload hidden widgets

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
Richard Steinmetz 2025-01-09 15:39:39 +01:00 committed by Andy Scherzinger
parent c5a85dcc1b
commit e1a3bb6571
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -295,6 +295,10 @@ export default {
for (const widget of Object.values(this.apiWidgets)) {
if (widget.reload_interval > 0) {
setInterval(async () => {
if (!this.layout.includes(widget.id)) {
return
}
await this.fetchApiWidgetItems([widget.id], true)
}, widget.reload_interval * 1000)
}