Update app.py
Browse files
app.py
CHANGED
@@ -338,7 +338,7 @@ def plot_week():
|
|
338 |
|
339 |
# Запрашиваем данные за выбранную неделю
|
340 |
cursor.execute('''
|
341 |
-
SELECT date_time, dey, ph, ec, tS, tA, hDm, sVen, onA, onB, onC
|
342 |
FROM system_data
|
343 |
WHERE wek = ?
|
344 |
ORDER BY date_time
|
@@ -364,7 +364,8 @@ def plot_week():
|
|
364 |
'sVen': [float(row[7]) if row[7] else 0.0 for row in rows], # Обороты вентилятора
|
365 |
'onA': [float(row[8]) if row[8] else 0.0 for row in rows], # Насос A
|
366 |
'onB': [float(row[9]) if row[9] else 0.0 for row in rows], # Насос B
|
367 |
-
'onC': [float(row[10]) if row[10] else 0.0 for row in rows]
|
|
|
368 |
}
|
369 |
|
370 |
# Отправляем данные в HTML-шаблон
|
@@ -393,6 +394,7 @@ def plot_week():
|
|
393 |
|
394 |
|
395 |
|
|
|
396 |
@app.route("/")
|
397 |
def index():
|
398 |
return flask.render_template('index.html')
|
|
|
338 |
|
339 |
# Запрашиваем данные за выбранную неделю
|
340 |
cursor.execute('''
|
341 |
+
SELECT date_time, dey, ph, ec, tS, tA, hDm, sVen, onA, onB, onC, v_hid, v_min
|
342 |
FROM system_data
|
343 |
WHERE wek = ?
|
344 |
ORDER BY date_time
|
|
|
364 |
'sVen': [float(row[7]) if row[7] else 0.0 for row in rows], # Обороты вентилятора
|
365 |
'onA': [float(row[8]) if row[8] else 0.0 for row in rows], # Насос A
|
366 |
'onB': [float(row[9]) if row[9] else 0.0 for row in rows], # Насос B
|
367 |
+
'onC': [float(row[10]) if row[10] else 0.0 for row in rows], # Насос C
|
368 |
+
'sus': [f"{row[11]}:{row[12]}" if row[11] and row[12] else "0:0" for row in rows] # Объединяем v_hid и v_min
|
369 |
}
|
370 |
|
371 |
# Отправляем данные в HTML-шаблон
|
|
|
394 |
|
395 |
|
396 |
|
397 |
+
|
398 |
@app.route("/")
|
399 |
def index():
|
400 |
return flask.render_template('index.html')
|