fix: sync contec oscilloscope machine UI, dual temp T1/T2, and cache-control to fiveparaminte-main for Render deployment
This commit is contained in:
@@ -70,7 +70,14 @@ def serve_dashboard():
|
||||
dashboard_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "static", "dashboard.html")
|
||||
try:
|
||||
with open(dashboard_path, "r", encoding="utf-8") as f:
|
||||
return HTMLResponse(content=f.read())
|
||||
return HTMLResponse(
|
||||
content=f.read(),
|
||||
headers={
|
||||
"Cache-Control": "no-cache, no-store, must-revalidate",
|
||||
"Pragma": "no-cache",
|
||||
"Expires": "0"
|
||||
}
|
||||
)
|
||||
except FileNotFoundError:
|
||||
return HTMLResponse(content="<h1>Dashboard not found</h1><p>static/dashboard.html is missing</p>", status_code=404)
|
||||
|
||||
@@ -192,6 +199,8 @@ def list_patients(db: Session = Depends(get_db)):
|
||||
"map_bp": latest_reading.map_bp if latest_reading else None,
|
||||
"respiratory_rate": latest_reading.respiratory_rate if latest_reading else None,
|
||||
"temperature": latest_reading.temperature if latest_reading else None,
|
||||
"temperature2": getattr(latest_reading, 'temperature2', None) if latest_reading else None,
|
||||
"temperature_diff": getattr(latest_reading, 'temperature_diff', None) if latest_reading else None,
|
||||
"timestamp": latest_reading.timestamp.isoformat() if (latest_reading and latest_reading.timestamp) else None,
|
||||
} if latest_reading else None
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user