mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
完成新的安装流程,开始优化日志管理;
This commit is contained in:
48
public/static/admin/js/debug/log.js
Normal file
48
public/static/admin/js/debug/log.js
Normal file
@@ -0,0 +1,48 @@
|
||||
define(["jquery", "easy-admin"], function ($, ea) {
|
||||
|
||||
var init = {
|
||||
table_elem: '#currentTable',
|
||||
table_render_id: 'currentTableRenderId',
|
||||
index_url: 'debug.log/index',
|
||||
add_url: 'debug.log/add',
|
||||
edit_url: 'debug.log/edit',
|
||||
delete_url: 'debug.log/delete',
|
||||
export_url: 'debug.log/export',
|
||||
modify_url: 'debug.log/modify',
|
||||
};
|
||||
|
||||
var Controller = {
|
||||
|
||||
index: function () {
|
||||
ea.table.render({
|
||||
init: init,
|
||||
size: 'sm',
|
||||
limit: 50,
|
||||
cols: [[
|
||||
{ type: 'checkbox' },
|
||||
{ field: 'id', title: 'id' },
|
||||
{ field: 'uid', title: 'uid', minWidth: 140 },
|
||||
{ field: 'level', title: 'level' },
|
||||
{ field: 'content', title: '日志内容', minWidth: 400, align: 'left', style: 'background-color:#eee' },
|
||||
{ field: 'create_time', title: 'create_time', minWidth: 160 },
|
||||
{ field: 'app_name', title: 'app_name' },
|
||||
{ field: 'controller_name', title: 'controller_name', },
|
||||
{ field: 'action_name', title: 'action_name' },
|
||||
]],
|
||||
toolbar: [
|
||||
'refresh',
|
||||
'export'
|
||||
]
|
||||
});
|
||||
|
||||
ea.listen();
|
||||
},
|
||||
add: function () {
|
||||
ea.listen();
|
||||
},
|
||||
edit: function () {
|
||||
ea.listen();
|
||||
},
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
@@ -1,35 +0,0 @@
|
||||
define(["jquery", "easy-admin"], function ($, ea) {
|
||||
|
||||
|
||||
var init = {
|
||||
table_elem: '#currentTable',
|
||||
table_render_id: 'currentTableRenderId',
|
||||
index_url: 'system.log/index',
|
||||
};
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
var util = layui.util;
|
||||
ea.table.render({
|
||||
init: init,
|
||||
toolbar: ['refresh'],
|
||||
cols: [[
|
||||
{field: 'id', width: 80, title: 'ID', search: false},
|
||||
{field: 'month', title: '日志月份', hide: true, search: 'time', timeType: 'month', searchValue: util.toDateString(new Date(), 'yyyy-MM')},
|
||||
{field: 'admin.username', minWidth: 80, title: '后台用户', search: false},
|
||||
{field: 'method', minWidth: 80, title: '请求方法'},
|
||||
{field: 'url', minWidth: 80, title: '路由地址'},
|
||||
{field: 'title', minWidth: 80, title: '日志标题'},
|
||||
{field: 'content', minWidth: 80, title: '操作内容'},
|
||||
{field: 'ip', minWidth: 80, title: 'IP地址'},
|
||||
{field: 'useragent', minWidth: 80, title: 'useragent'},
|
||||
{field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'},
|
||||
]],
|
||||
});
|
||||
|
||||
ea.listen();
|
||||
},
|
||||
};
|
||||
|
||||
return Controller;
|
||||
});
|
||||
Reference in New Issue
Block a user