Source

iredadmin-ose / templates / default / panel / log.html

Full commit
Zhang Huangbin 878d625 

Zhang Huangbin 551aed9 
Zhang Huangbin 878d625 






















Zhang Huangbin 551aed9 
Zhang Huangbin 878d625 




Zhang Huangbin 551aed9 







Zhang Huangbin 878d625 



Zhang Huangbin 551aed9 



Zhang Huangbin 878d625 
Zhang Huangbin a328791 

Zhang Huangbin 878d625 






Zhang Huangbin 551aed9 



Zhang Huangbin 878d625 














Zhang Huangbin 551aed9 





Zhang Huangbin 2952591 
Zhang Huangbin 551aed9 












Zhang Huangbin 878d625 








Zhang Huangbin 551aed9 

Zhang Huangbin 878d625 




Zhang Huangbin 551aed9 
Zhang Huangbin 878d625 


Zhang Huangbin 551aed9 

Zhang Huangbin 878d625 




{% 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:') }}&nbsp;
    <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 %}