(data)
| 2885 | |
| 2886 | @socketio.on("subscribe") |
| 2887 | def handle_subscribe(data): |
| 2888 | if not log_manager: |
| 2889 | emit("full_state", {}) |
| 2890 | return |
| 2891 | path = "" |
| 2892 | if isinstance(data, dict): |
| 2893 | path = data.get("path", "") |
| 2894 | session = log_manager.subscribe(request.sid, path) |
| 2895 | if session: |
| 2896 | session.emit_full_state(request.sid) |
| 2897 | emit("log_selected", {"path": str(session.path)}) |
| 2898 | else: |
| 2899 | emit("full_state", {}) |
| 2900 | |
| 2901 | |
| 2902 | @socketio.on("switch_log") |
no test coverage detected