feature(web): 增加一个直接通过 zookeeper 查询运行时信息的页面

This commit is contained in:
2023-05-23 15:54:11 +08:00
parent 5e191a176d
commit f29cccf9dd
8 changed files with 336 additions and 6 deletions

View File

@@ -1,9 +1,9 @@
function timeAndFrom(field, fromNow, emptyText) {
if (!emptyText) {
emptyText = '未停止'
function timeAndFrom(field, fromNow, emptyText = '未停止', showSource = true) {
let tpl = "<span class='font-bold'>${" + fromNow + "}</span>"
if (showSource) {
tpl = tpl + "<br> ${IF(" + field + " === 0, '(" + emptyText + ")', CONCATENATE('(',DATETOSTR(DATE(" + field + ")),')'))}"
}
// language=TEXT
return "<span class='font-bold'>${" + fromNow + "}</span><br> ${IF(" + field + " === 0, '(" + emptyText + ")', CONCATENATE('(',DATETOSTR(DATE(" + field + ")),')'))}"
return tpl
}
function yarnCrudColumns() {