{% for camera in cameras %}
{% set local_stream_url = get_rtsp_url(camera, 'local') %}
{% set remote_stream_url = get_rtsp_url(camera, 'remote') %}
{% set status = tunnel_helper.check_tunnel_status(*tunnel_helper.parse_address(remote_stream_url)) if
remote_stream_url else None %}
{% if camera[CameraTableIndex.REMOTE_STREAM_URL] !=
None %}
Link
{% else %}
Not Available
{% endif %}
{% if camera[CameraTableIndex.REMOTE_STREAM_URL] != None %}
{% if status in ['running', 'sleeping', 'waking', 'idle'] %}
Running
{% elif status not in ['running', 'sleeping', 'waking', 'idle'] %}
Exited
{% else %}
Not Running
{% endif %}
{% else %}
Not Running
{% endif %}
{% if camera[CameraTableIndex.REMOTE_STREAM_URL] != None %}
{% if status in ['running', 'sleeping', 'waking', 'idle'] %}
{% elif status not in ['running', 'sleeping', 'waking', 'idle'] %}
{% endif %}
{% else %}
{% endif %}
{% endfor %}
{% for camera in cameras %}
{% set local_stream_url = get_rtsp_url(camera, 'local') %}
{% set remote_stream_url = get_rtsp_url(camera, 'remote') %}
{% set status = tunnel_helper.check_tunnel_status(*tunnel_helper.parse_address(remote_stream_url)) if
remote_stream_url else None %}
Loading...
{% if camera[CameraTableIndex.REMOTE_STREAM_URL] != None %}
{% if status in ['running', 'sleeping', 'waking', 'idle'] %}
Running
{% elif status not in ['running', 'sleeping', 'waking', 'idle'] %}
Exited
{% else %}
Not Running
{% endif %}
{% else %}
Not Running
{% endif %}