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,8 +364,7 @@ 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 |
-
'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-шаблон
|
@@ -391,6 +390,9 @@ def plot_week():
|
|
391 |
|
392 |
|
393 |
|
|
|
|
|
|
|
394 |
@app.route("/")
|
395 |
def index():
|
396 |
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
|
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 |
}
|
369 |
|
370 |
# Отправляем данные в HTML-шаблон
|
|
|
390 |
|
391 |
|
392 |
|
393 |
+
|
394 |
+
|
395 |
+
|
396 |
@app.route("/")
|
397 |
def index():
|
398 |
return flask.render_template('index.html')
|