{# version, hostname, uptime, loadavg, #}
{% extends "layout.html" %}
{% from "macros/msg_handlers.html" import success_info, error_info with context %}
{% block title %} {{ _('Dashboard') }} {% endblock %}
{% block navlinks_dashboard %}class="active"{% endblock %}
{% block main %}
{# Checked and get response data #}
{% if session.get('new_version_available') %}
{{ success_info( _("New version of iRedAdmin-Pro, %s, is now available for upgrading. Details") |format(session.get('new_version') |e, ctx.homepath), removable=false, trusted=true ) }}
{% elif session.get('new_version_available') is sameas false %}
{# Error while checking new version #}
{{ error_info( _('Error while checking new version of iRedAdmin-Pro:') + ' ' + session.get('new_version_check_error') |e ) }}
{% endif %}
{% if session.get('amavisd_enable_logging') or session.get('fail2ban_enabled') or session.get('iredapd_enabled') %}
{{ _('Statistics of latest 24 hours') |title }}
{% if session.get('amavisd_enable_logging') %}
|
{{ _('Received') }} |
{% if session.get('disable_viewing_mail_log') %}
{{ num_incoming_mails }} |
{% else %}
{{ num_incoming_mails }} |
{% endif %}
|
{{ _('Sent') }} |
{% if session.get('disable_viewing_mail_log') %}
{{ num_outgoing_mails }} |
{% else %}
{{ num_outgoing_mails }} |
{% endif %}
{% if session.get('amavisd_enable_quarantine') %}
|
{{ _('Virus') }} |
{% if session.get('disable_viewing_mail_log') %}
{{ num_virus }} |
{% else %}
{{ num_virus }} |
{% endif %}
|
{{ _('Quarantined') }} |
{% if session.get('disable_managing_quarantined_mails') %}
{{ num_quarantined }} |
{% else %}
{{ num_quarantined }} |
{% endif %}
{% endif %}
{% endif %}
{% if session.get('iredapd_enabled') %}
|
{{ _('Rejected Messages') }} |
{{ num_rejected }} |
|
{{ _('Outbound SMTP Sessions') }} |
{{ num_smtp_outbound_sessions }} |
{% endif %}
{% if session.get('is_global_admin') and session.get('fail2ban_enabled') %}
|
{{ _('Banned IP Addresses') }} |
{{ num_banned }} |
{% endif %}
{% endif %}
{{ _('System Information') }}
{# Show number of total domains, users, aliases #}
| {{ _('Number of domains') }} |
{{ num_existing_domains |e }}{% if backend in ['mysql', 'pgsql'] %}{% if num_max_domains >= 0 %} ({{ _('Max:') }} {{ num_max_domains }}){% endif %}{% endif %} |
{% if backend in ['mysql', 'pgsql'] %}
| {{ _('Number of users') }} |
{{ num_existing_users |e }}{% if num_max_users >= 0 %} ({{ _('Max:') }} {{ num_max_users }}){% endif %} |
| {{ _('Number of mailing lists') }} |
{{ num_existing_lists |e }}{% if num_max_lists >= 0 %} ({{ _('Max:') }} {{ num_max_lists }}){% endif %} |
| {{ _('Number of aliases') }} |
{{ num_existing_aliases |e }}{% if num_max_aliases >= 0 %} ({{ _('Max:') }} {{ num_max_aliases }}){% endif %} |
{% endif %}
{% if session.get('is_global_admin') %}
{% if session.get('show_used_quota') %}
| {{ _('Stored emails') }} |
{% if total_messages %}{{ total_messages |e }} {{ _('Emails') }}.{% endif %} {% if total_bytes %}{{ total_bytes |file_size_format }}.{% endif %} |
{% endif %}
| iRedMail |
{{ iredmail_version }} |
| iRedAdmin-Pro |
{{ version |e }}
{% if backend == 'mysql' %}
(MySQL)
{% elif backend == 'pgsql' %}
(PostgreSQL)
{% elif backend == 'ldap' %}
(LDAP)
{% endif %}
|
{# ---- System Information ---- #}
| {{ _('Hostname') }} |
{{ hostname |e }} |
{% if uptime is not sameas none and uptime|length == 3 %}
| {{ _('Uptime') }} |
{{ _('%s days, %s hours, %s minutes.') |format(uptime[0] |e, uptime[1] |e, uptime[2] |e ) }} |
{% endif %}
| {{ _('Server Load') }} |
{{ loadavg[0] }}, {{ loadavg[1] }}, {{ loadavg[2] }} |
{# ---- Network interfaces and IP info ---- #}
{% for netif in netif_data %}
| {{ _('Network') }} ({{ netif[0] |e }}) |
{{ netif[1] }} |
{% endfor %}
{% endif %}{# global admin #}
{# .box-wrap #}
{# col1-3 #}
{% if session.get('amavisd_enable_logging') %}
{{ _('Top Senders') |title }}
{% for s in top_senders %}
| {{ s.total |e }} |
{% if s.mail %}
{% set _mail = s.mail |e %}
{% if session.get('disable_viewing_mail_log') is sameas true %}
{{ _mail }} |
{% elif s.policy == 'MLMMJ' %}
{{ _mail }} ({{ _('Mailing List') }}) |
{% else %}
{{ _mail }} |
{% endif %}
{% else %}
<> |
{% endif %}
{% endfor %}
{{ _('Top Recipients') |title }}
{% for s in top_recipients %}
| {{ s.total |e }} |
{% if s.mail %}
{% set _mail = s.mail |e %}
{% if session.get('disable_viewing_mail_log') is sameas true %}
{{ _mail }} |
{% else %}
{{ _mail }} |
{% endif %}
{% else %}
<> |
{% endif %}
{% endfor %}
{% endif %}
{% endblock main %}