Source

dbmailadmin / templates / default / panel / log.html

{% extends "layout.html" %}
{% from "macros/general.html" import
            display_csrf_token,
            show_pages,
            show_event_name,
            with context
            %}

{% from "macros/msgHandlers.html" import
            logMsgHandler,
            with context
            %}

{% block title %}{{ _('Admin Log') }}{% endblock %}
{% block navlinks_active_system %}class="active"{% endblock %}

{% block main %}

{{ logMsgHandler(msg) }}

<div class="content-box">
    <div class="box-body">
        <div class="box-header clear">
                <h2>
                    {{ _('Admin Log') }}
                    {% if total > 0 %}
                        ({{ (cur_page-1)*pageSizeLimit + 1 }}-{{ (cur_page-1)*pageSizeLimit + (entries |length) }}/{{ total }})
                    {% endif %}
                </h2>

            <ul class="tabs clear">
                <li class="active"><a href="{{ctx.homepath}}/system/log">{{ _('Admin Log') }}</a></li>
                {% if session.get('enableAmavisdLoggingIntoSQL') is sameas true %}
                    <li><a href="{{ctx.homepath}}/activities/sent">{{ _('Sent Mails') }}</a></li>
                    <li><a href="{{ctx.homepath}}/activities/received">{{ _('Received Mails') }}</a></li>
                {% endif %}

                {% if session.get('enableAmavisdQuarantine') is sameas true %}
                    <li><a href="{{ctx.homepath}}/activities/quarantined">{{ _('Quarantined Mails') }}</a></li>
                {% endif %}
            </ul>
        </div>

{# List all pages. #}
<div class="clear"></div>
<div class="top-space5 bt-space5 left-space5">
    <form name="pages" method="get" action="{{ctx.homepath}}/system/log">
    {{ _('Filter:') }}
    <select name="domain">
        <option value="all">{{ _('Domains') }}</option>
        {% for d in allDomains %}
            <option value="{{ d |e }}" {% if d == domain %}selected{% endif %}>{{ d |e }}</option>
        {% endfor %}
    </select>

    {% if session.get('domainGlobalAdmin') is sameas true %}
        <select name="admin">
            <option value="all">{{ _('Admins') }}</option>
            {% for a in allAdmins %}
                <option value="{{ a |e }}" {% if a == admin %}selected{% endif %}>{{ a |e }}</option>
            {% endfor %}
        </select>
    {% endif %}

    <select name="event">
        {% for evt in allEvents %}
            <option value="{{ evt |e }}" {% if evt == event %}selected{% endif %}>{{ show_event_name(event=evt) }}</option>
        {% endfor %}
    </select>

    <input type="submit" value="{{ _('Submit') }}" class="button" />
    </form>
</div>

{# List all logs #}
    <form name="log" id="list_table" method="post" action="{{ctx.homepath}}/system/log">
    {{ display_csrf_token() }}

    <table class="style1" cellspacing="0">
        <thead>
        <tr>
            {% if session.get('domainGlobalAdmin') is sameas true %}
                <th class="checkbox"><input type="checkbox" class="checkbox select-all" /></th>
            {% endif %}
            <th>{{ _('Time') }}</th>
            <th>{{ _('Admin') }}</th>
            <th>{{ _('IP Address') }}</th>
            <th>{{ _('Message') }}</th>
        </tr>
        </thead>

        {# List domain attributes/avalues. #}
        <tbody>
            {% if entries |length > 0 %}
                {% for log in entries %}
                    <tr>
                        {% if session.get('domainGlobalAdmin') is sameas true %}
                            <td class="checkbox"><input type="checkbox" name="id" value="{{ log.id }}" class="checkbox" /></td>
                        {% endif %}
                        <td style="white-space: nowrap;">{{ log.timestamp |setDatetimeFormat }}</td>
                        <td><a href="{{ctx.homepath}}/profile/admin/general/{{ log.admin |e }}">{{ log.admin |e }}</a></td>
                        <td>{{ log.ip |e }}</td>
                        <td class="{{ log.event |e }}_{{ log.loglevel |e }}">{{ log.msg |e }}</td>
                    </tr>
                {% endfor %}
            {% else %}
                <tr>
                    {% if session.get('domainGlobalAdmin') is sameas true %}
                        <td class="checkbox"></td>
                    {% endif %}
                    <td colspan="4">{{ _('No admin log.') }}</td>
                </tr>
            {% endif %}
        </tbody>
    </table>

    {% if session.get('domainGlobalAdmin') is sameas true %}
        <div class="tab-footer clear f1">
            {% if session.get('domainGlobalAdmin') is sameas true %}
                <div class="fl">
                    <select name="action" class="fl-space">
                        <option>{{ _('Choose Action') }}</option>
                        <option value="delete">{{ _('Delete selected') }}</option>
                        <option value="deleteAll">{{ _('Delete all in database') }}</option>
                    </select>
                    <input type="submit" value="{{ _('Apply') }}" class="button fl-space" />
                </div>
            {% endif %}

            {{ show_pages(
                  baseurl=ctx.homepath + '/system/log?domain=' + domain + '&event=' + event + '&admin=' + admin,
                  total=total,
                  cur_page=cur_page,
                  sep='&page=')
                  }}
        </div>
    {% endif %}
</form>
</div>
</div>
{% endblock main %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.