mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-09-05 07:15:31 +08:00
feat(admin): XHProf 函数监控规则与命中记录
This commit is contained in:
38
app/admin/view/xhprof/watch/index.js
Normal file
38
app/admin/view/xhprof/watch/index.js
Normal file
@@ -0,0 +1,38 @@
|
||||
$(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();
|
||||
})
|
||||
Reference in New Issue
Block a user