sleeping devices status #1519

This commit is contained in:
Jokob @NetAlertX
2026-03-02 04:35:07 +00:00
parent deb0d16c3d
commit 8e6efc3008
22 changed files with 211 additions and 55 deletions

View File

@@ -11,6 +11,7 @@ import uuid
# Register NetAlertX libraries
import conf
from const import fullConfPath, fullConfFolder, default_tz, applicationPath
from db.db_upgrade import ensure_views
from helper import getBuildTimeStampAndVersion, collect_lang_strings, updateSubnets, generate_random_string
from utils.datetime_utils import timeNowUTC
from app_state import updateState
@@ -733,6 +734,12 @@ def importConfigs(pm, db, all_plugins):
db.commitDB()
# Rebuild DevicesView now that settings (including NTFPRCS_sleep_time) are committed.
# This is the single call site — initDB() deliberately skips it so the view
# always gets the real user value, not an empty-Settings fallback.
ensure_views(sql)
db.commitDB()
# update only the settings datasource
update_api(db, all_plugins, True, ["settings"])