add a monitoring camera setting for cetana

This commit is contained in:
Your Name
2026-10-31 21:08:26 +03:30
parent 33aebe9b14
commit 093e0b9d1a
11 changed files with 732 additions and 9 deletions
+10 -2
View File
@@ -4,7 +4,15 @@ from apps.live_monitoring.models import Camera
class CameraSerializer(serializers.ModelSerializer):
# auth_config is never exposed to the frontend.
"""Public camera card. Stream URLs and credentials are never listed here —
clients must go through the tokenized ``access`` / ``verify`` flow.
"""
protocol = serializers.SerializerMethodField()
class Meta:
model = Camera
fields = ["id", "name", "facility", "processing_line", "stream_url", "active"]
fields = ["id", "name", "facility", "processing_line", "protocol", "active"]
def get_protocol(self, obj: Camera) -> str:
return obj.resolved_protocol()