From d8e044f59c19a57db68dd0b6e3346ab16f9d066f Mon Sep 17 00:00:00 2001 From: "AzureAD\\AniketSaha" Date: Wed, 9 Jul 2025 13:38:27 +0200 Subject: [PATCH] Added minor changes --- static/index.html | 87 ++++++++--------------------------------------- 1 file changed, 14 insertions(+), 73 deletions(-) diff --git a/static/index.html b/static/index.html index 75387ad..d55e59f 100644 --- a/static/index.html +++ b/static/index.html @@ -148,9 +148,9 @@
- - - + + +
@@ -210,9 +210,9 @@

Conductivity

-
#1
0.0 µS/cm
-
#2
0.0 µS/cm
-
#3
0.0 µS/cm
+
#1
0.0 µS/cm
+
#2
0.0 µS/cm
+
#3
0.0 µS/cm
@@ -269,38 +269,14 @@ } - async function updateMonitorData() { - const response = await fetch('/monitor'); - const data = await response.json(); // data = { PU_1: {...}, PU_2: {...}, PU_3: {...} } - - for (const [puId, puData] of Object.entries(data)) { - const container = document.getElementById(puId); - if (!container) continue; - - container.innerHTML = ` -

${puId}

-
Q_perm
${puData.Qperm.toFixed(1)} L/h
-
Q_dilute
${puData.Qdilute.toFixed(1)} L/h
-
Q_drain
${puData.Qdrain.toFixed(1)} L/h
-
Q_recirc
${puData.Qrecirc.toFixed(1)} L/h
- -
P_ro
${puData.Pro.toFixed(1)} bar
-
P_dilute
${puData.Pdilute.toFixed(1)} bar
-
P_rentate
${puData.Prentate.toFixed(1)} bar
- -
Conductivity
${puData.Conductivity.toFixed(1)} µS/cm
- -
MV02
${puData.MV02.toFixed(1)} % (sp: ${puData.MV02_sp.toFixed(1)})
-
MV03
${puData.MV03.toFixed(1)} % (sp: ${puData.MV03_sp.toFixed(1)})
-
MV05
${puData.MV05.toFixed(1)} % (sp: ${puData.MV05_sp.toFixed(1)})
-
MV06
${puData.MV06.toFixed(1)} % (sp: ${puData.MV06_sp.toFixed(1)})
-
MV07
${puData.MV07.toFixed(1)} % (sp: ${puData.MV07_sp.toFixed(1)})
-
MV08
${puData.MV08.toFixed(1)} % (sp: ${puData.MV08_sp.toFixed(1)})
- `; - } - } - - + async function updateMonitorData() { + const response = await fetch('/monitor'); + const data = await response.json(); + updateMonitorValues('Qperm', data.Qperm, 'L/h'); + updateMonitorValues('Pdilute', data.Pdilute, 'bar'); + updateMonitorValues('Conductivity', data.Conductivity, 'µS/cm'); + updateMonitorValues('Pro', data.Pro, 'units'); + } function updateMonitorValues(id, values, unit) { const container = document.getElementById(id); @@ -315,40 +291,5 @@ // Update monitor data every second setInterval(updateMonitorData, 1000); - - -