{% extends "monitoring/base.html" %} {% import 'monitoring/icons.html' as icons %} {% import 'monitoring/utils.html' as utils %} {%block title%}Cameras{%endblock%} {%block content%}
Group by organization streamer preset
Sort by camera {% if params.group != 'preset_title' %} preset {% endif %} {% if params.group != 'organization_title' %} organization {% endif %} {% if params.group != 'folder_title' %} folder {% endif %} {% if params.group != 'streamer_title' %} streamer {% endif %}
Filter All A O Z E T M D V
{% for domain_id, domain_cams in cameras|groupby('domain_id') %}

{{ domain_cams[0].domain_title }} ({{ domain_id }})

{% for group_label, group_items in domain_cams |rejectattr(params.group or 'organization_title', "none") |rejectattr((params.sort or 'camera_title').lstrip('-'), "none") |rejectattr((params.filter or '__').lstrip('-'), "true" if (params.filter or '__')[0]=='-' else "false") |rejectattr((params.filter or '__').lstrip('-'), "true" if (params.filter or '__')[0]=='-' else "none") |sort(attribute=(params.sort or 'camera_title').lstrip('-'), reverse=(params.sort or 'camera_title')[0]=='-') |groupby(params.group or 'organization_title') %}

{% if not params.group or params.group == 'organization_title' %} {{ icons.organization(group_items[0].organization_id, group_label) }} {% endif %} {% if params.group == 'agent_model' %} {{ icons.agent_model(group_items[0].agent_model) }} {% endif %} {% if params.group == 'streamer_title' %} {{ icons.streamer(group_items[0].streamer_id, group_label) }} {% endif %} {% if params.group == 'preset_title' %} {{ icons.preset(group_items[0].preset_id, group_label) }} {% endif %}

{% for it in group_items %}
{{'S' if it.static else 'D'}} {{ it.camera_id }} ({{ it.camera_title }})
{% if params.group and params.group != 'organization_title' %}
{{ icons.organization(it.organization_id, it.organization_title) }}
{% endif %} {% if params.group != 'preset_title' %}
{{ it.preset_title }} ({{ it.preset_id }})
{% endif %} {% if params.group != 'folder_title' %}
{{ it.folder_title }} ({{ it.folder_id }})
{% endif %} {% if params.group != 'streamer_title' %}
{{ icons.streamer(it.streamer_id, it.streamer_title) }}
{% endif %} {% if params.group != 'dvr_bytes' %}
{{ icons.dvr_info(it.dvr_depth, it.dvr_space, it.real_dvr_depth, it.real_dvr_space) }}
{% endif %}
A O Z E T M D V{{(it.vision_alg or ' ')[0].upper()}}
{% endfor %} {% endfor %} {% endfor %} {%endblock%}