refactor(web): 优化日志查看

This commit is contained in:
2023-05-29 15:09:22 +08:00
parent 1dc9d69310
commit 8e9b04acab
4 changed files with 67 additions and 10 deletions

View File

@@ -6,6 +6,44 @@ function timeAndFrom(field, fromNow, emptyText = '未停止', showSource = true)
return tpl
}
function applicationLogDialog() {
return {
type: 'action',
level: 'link',
actionType: 'dialog',
dialog: {
title: '应用日志',
size: 'xl',
actions: [],
body: [
{
type: 'service',
api: {
method: 'GET',
url: '${base}/log/query_application_log',
data: {
application_id: '${id}',
}
},
body: [
{
disabled: true,
type: 'editor',
name: 'detail',
label: '应用日志',
size: 'xxl',
placeholder: '没有内容',
options: {
wordWrap: 'on',
}
}
]
},
]
}
}
}
function yarnCrudColumns() {
return [
{
@@ -163,6 +201,10 @@ function yarnCrudColumns() {
actionType: 'url',
url: '${trackingUrl}',
blank: true,
},
{
label: '日志',
...applicationLogDialog(),
}
]
}