mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-09-03 06:31:37 +08:00
39 lines
1.7 KiB
PHP
39 lines
1.7 KiB
PHP
$(function(){
|
|
ua.table.render({
|
|
init: init,
|
|
toolbar: ['add', 'delete'],
|
|
cols: [[
|
|
{type: 'checkbox'},
|
|
{field: 'id', title: 'ID', width: 80, sort: true},
|
|
{field: 'name', title: '规则名称', minWidth: 140},
|
|
{field: 'regex', title: '正则(匹配被调用函数名)', minWidth: 260, templet: function(d) {
|
|
var esc = String(d.regex == null ? '' : d.regex).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
return '<code style="font-size:12px;">' + esc + '</code>';
|
|
}},
|
|
{field: 'note', title: '备注', minWidth: 140},
|
|
{field: 'threshold_ms', title: '阈值(ms)', width: 100, search: 'number_limit'},
|
|
{field: 'status', title: '状态', width: 100, search: 'select', selectList: ua.getDataBrage('select_list_status'), templet: ua.table.switch},
|
|
{field: 'create_time', title: '创建时间', width: 170, search: false, templet: ua.table.date},
|
|
{
|
|
width: 200, title: '操作', templet: ua.table.tool, fixed: 'right', operat: [
|
|
[{
|
|
class: 'layui-btn layui-btn-primary layui-btn-xs',
|
|
method: 'tab',
|
|
field: 'id',
|
|
text: '详情',
|
|
title: '查看详情',
|
|
auth: 'read',
|
|
url: init.readUrl,
|
|
icon: ''
|
|
}],
|
|
'edit',
|
|
'delete'
|
|
]
|
|
},
|
|
|
|
]],
|
|
});
|
|
|
|
ua.listen();
|
|
})
|