feat(monitoring): add priority screenshot pipeline with screenshot_type + docs cleanup
Implement end-to-end support for typed screenshots and priority rendering in monitoring. Added - Accept and forward screenshot_type from MQTT screenshot/dashboard payloads (periodic, event_start, event_stop) - Extend screenshot upload handling to persist typed screenshots and metadata - Add dedicated priority screenshot serving endpoint with fallback behavior - Extend monitoring overview with priority screenshot fields and summary count - Add configurable PRIORITY_SCREENSHOT_TTL_SECONDS window for active priority state Fixed - Ensure screenshot cache-busting updates reliably via screenshot hash updates - Preserve normal periodic screenshot flow while introducing event_start/event_stop priority path Improved - Monitoring dashboard now displays screenshot type badges - Adaptive polling: faster refresh while priority screenshots are active - Priority screenshot presentation is surfaced immediately to operators Docs - Update README and copilot-instructions to match new screenshot_type behavior, priority endpoint, TTL config, monitoring fields, and retention model - Remove redundant/duplicate documentation blocks and improve troubleshooting section clarity
This commit is contained in:
@@ -68,6 +68,16 @@ def index():
|
||||
return "Hello from Infoscreen‐API!"
|
||||
|
||||
|
||||
@app.route("/screenshots/<uuid>/priority")
|
||||
def get_priority_screenshot(uuid):
|
||||
normalized_uuid = uuid[:-4] if uuid.lower().endswith('.jpg') else uuid
|
||||
priority_filename = f"{normalized_uuid}_priority.jpg"
|
||||
priority_path = os.path.join("screenshots", priority_filename)
|
||||
if os.path.exists(priority_path):
|
||||
return send_from_directory("screenshots", priority_filename)
|
||||
return get_screenshot(uuid)
|
||||
|
||||
|
||||
@app.route("/screenshots/<uuid>")
|
||||
@app.route("/screenshots/<uuid>.jpg")
|
||||
def get_screenshot(uuid):
|
||||
|
||||
Reference in New Issue
Block a user