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
parent 33b564dfa9
commit 84c20650d2
No known key found for this signature in database
GPG key ID: 27137D9E7D273FB2
3 changed files with 7 additions and 3 deletions

View file

@ -306,6 +306,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)
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long