operation_log.hbs 1.88 KB
<div class="pageheader">
    <div class="media">
        <div class="pageicon pull-left">
            <i class="fa fa-th-list"></i>
        </div>
        <div class="media-body">
            <ul class="breadcrumb">
                <li><a href="/"><i class="glyphicon glyphicon-home"></i></a></li>
                <li><a href="/servers">系统管理</a></li>
                <li>操作日志</li>
            </ul>
            <h4>所有用户数据操作日志</h4>
        </div>
    </div>
    <!-- media -->
</div>

<div class="contentpanel project-index-page">
    <div class="panel panel-default">
        <div class="panel-heading">
            <div class="pull-right">
                <a href="" class="tooltips panel-minimize"><i class="fa fa-minus"></i></a>
            </div>
            <h4 class="panel-title">操作日志</h4>
        </div>
        <div class="panel-body">
            <table id="table-log" class="table table-striped table-bordered building-table">
                <thead>
                <tr>
                    <th>操作用户</th>
                    <th>时间</th>
                    <th>动作</th>
                    <th>描述</th>
                    <th>数据</th>
                </tr>
                </thead>
            </table>
        </div>
    </div>
</div>

<script>

    $(function() {

        var tables = {};
        $('.building-table').each(function() {
            var env = $(this).parents('.panel').data('env');
            tables[env] = $(this).DataTable({
                responsive: true,
                ajax: '/operation/log/query',
                columns: [
                    {data: "username"},
                    {data: "time"},
                    {data: "action"},
                    {data: "description"},
                    {data: "meta"}
                ],
                order: [[1, 'desc']]
            });
        });
    });
</script>