From 058c5dd015829c584d6d7f9fea290ab3e74015e2 Mon Sep 17 00:00:00 2001 From: Otto Date: Tue, 16 Jun 2026 21:51:48 +0200 Subject: [PATCH] Reduce dashboard load overhead --- app/static/index.html | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/app/static/index.html b/app/static/index.html index 374fbff..545587c 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -285,14 +285,15 @@ function optionGroups(entities, selectedIds = new Set()) { async function loadOverview() { const status = document.getElementById("status"); const chips = document.getElementById("status-chips"); + let reconciliation = null; try { - const [health, websocket, ml, reconciliation, actuators] = await Promise.all([ + const [health, websocket, ml] = await Promise.all([ api("health"), api("health/websocket"), api("ml/health"), - api("v1/actuators/reconciliation/state"), - api("v1/actuators"), ]); + reconciliation = await api("v1/actuators/reconciliation/state"); + const actuators = await api("v1/actuators"); status.innerHTML = `

System bereit

Letzte automatische Prüfung: ${escapeHtml(reconciliation.last_completed_at || "noch nie")}

`; chips.innerHTML = [ `API: ${escapeHtml(health.status)}`, @@ -313,12 +314,8 @@ async function loadActuatorDiscovery() { const options = document.getElementById("actuator-options"); const select = document.getElementById("actuator-select"); try { - const [available, configured] = await Promise.all([ - api("v1/actuators/discovery"), - api("v1/actuators"), - ]); - const configuredIds = new Set(configured.map(record => record.actuator_entity_id)); - actuatorChoices = available.filter(entity => !configuredIds.has(entity.entity_id)); + const available = await api("v1/actuators/discovery"); + actuatorChoices = available; options.innerHTML = actuatorChoices.slice(0, 120).map(entity => `` ).join("");