feature(web): 增加未跨天未接收详情查看
This commit is contained in:
@@ -4,6 +4,7 @@ import cn.hutool.core.map.MapUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.lanyuanxiaoyao.service.configuration.ExecutorProvider;
|
import com.lanyuanxiaoyao.service.configuration.ExecutorProvider;
|
||||||
import com.lanyuanxiaoyao.service.configuration.entity.AmisResponse;
|
import com.lanyuanxiaoyao.service.configuration.entity.AmisResponse;
|
||||||
|
import com.lanyuanxiaoyao.service.configuration.entity.info.JobIdAndAlias;
|
||||||
import com.lanyuanxiaoyao.service.configuration.entity.yarn.YarnApplication;
|
import com.lanyuanxiaoyao.service.configuration.entity.yarn.YarnApplication;
|
||||||
import com.lanyuanxiaoyao.service.configuration.entity.yarn.YarnRootQueue;
|
import com.lanyuanxiaoyao.service.configuration.entity.yarn.YarnRootQueue;
|
||||||
import com.lanyuanxiaoyao.service.forest.service.InfoService;
|
import com.lanyuanxiaoyao.service.forest.service.InfoService;
|
||||||
@@ -134,4 +135,21 @@ public class OverviewController extends BaseController {
|
|||||||
.withData("unReceive", Maps.immutable.of("normal", unReceiveNormalTableCount.get(), "focus", unReceiveFocusCount.get()))
|
.withData("unReceive", Maps.immutable.of("normal", unReceiveNormalTableCount.get(), "focus", unReceiveFocusCount.get()))
|
||||||
.withData("unSchedule", Maps.immutable.of("normal", unScheduledNormalTableCount.get(), "focus", unScheduledFocusTableCount.get()));
|
.withData("unSchedule", Maps.immutable.of("normal", unScheduledNormalTableCount.get(), "focus", unScheduledFocusTableCount.get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("version_detail")
|
||||||
|
public AmisResponse versionDetail(String target, String version) throws Exception {
|
||||||
|
ImmutableList<JobIdAndAlias> jobIdAndAliases;
|
||||||
|
if (StrUtil.equals("unReceive_focus", target)) {
|
||||||
|
jobIdAndAliases = infoService.unReceiveVersionFocusTable(version);
|
||||||
|
} else if (StrUtil.equals("unScheduled_focus", target)) {
|
||||||
|
jobIdAndAliases = infoService.unScheduledFocusTable(version);
|
||||||
|
} else if (StrUtil.equals("unReceive_normal", target)) {
|
||||||
|
jobIdAndAliases = infoService.unReceiveVersionNormalTable(version);
|
||||||
|
} else if (StrUtil.equals("unScheduled_normal", target)) {
|
||||||
|
jobIdAndAliases = infoService.unScheduledNormalTable(version);
|
||||||
|
} else {
|
||||||
|
throw new Exception("Target not found " + target);
|
||||||
|
}
|
||||||
|
return responseCrudData(jobIdAndAliases);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,91 @@ function color(number) {
|
|||||||
return color
|
return color
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function versionDetailDialog(variable, target) {
|
||||||
|
return {
|
||||||
|
disabledOn: `${variable} === 0`,
|
||||||
|
type: 'action',
|
||||||
|
label: '详情',
|
||||||
|
level: 'link',
|
||||||
|
size: 'sm',
|
||||||
|
actionType: 'dialog',
|
||||||
|
dialog: {
|
||||||
|
title: '详情',
|
||||||
|
actions: [],
|
||||||
|
size: 'md',
|
||||||
|
closeOnEsc: false,
|
||||||
|
closeOnOutside: false,
|
||||||
|
body: [
|
||||||
|
{
|
||||||
|
type: 'service',
|
||||||
|
api: {
|
||||||
|
method: 'get',
|
||||||
|
url: '${base}/overview/version_detail',
|
||||||
|
data: {
|
||||||
|
target: `${target}`,
|
||||||
|
version: '${version}',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
body: [
|
||||||
|
{
|
||||||
|
type: "table",
|
||||||
|
source: "${items}",
|
||||||
|
affixHeader: false,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
label: 'Flink job id',
|
||||||
|
fixed: 'left',
|
||||||
|
type: 'wrapper',
|
||||||
|
size: 'none',
|
||||||
|
body: [
|
||||||
|
{
|
||||||
|
type: 'tpl',
|
||||||
|
tpl: '${id}',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'action',
|
||||||
|
level: 'link',
|
||||||
|
label: '',
|
||||||
|
icon: 'fa fa-copy',
|
||||||
|
size: 'xs',
|
||||||
|
actionType: 'copy',
|
||||||
|
content: '${id}',
|
||||||
|
tooltip: '复制 ID',
|
||||||
|
}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '别名',
|
||||||
|
type: 'wrapper',
|
||||||
|
fixed: 'left',
|
||||||
|
size: 'none',
|
||||||
|
className: 'nowrap',
|
||||||
|
body: [
|
||||||
|
{
|
||||||
|
type: 'tpl',
|
||||||
|
tpl: '${alias}',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'action',
|
||||||
|
level: 'link',
|
||||||
|
label: '',
|
||||||
|
icon: 'fa fa-copy',
|
||||||
|
size: 'xs',
|
||||||
|
actionType: 'copy',
|
||||||
|
content: '${alias}',
|
||||||
|
tooltip: '复制别名',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function overviewYarnJob(cluster, search, queue, yarnQueue) {
|
function overviewYarnJob(cluster, search, queue, yarnQueue) {
|
||||||
return {
|
return {
|
||||||
className: 'font-mono',
|
className: 'font-mono',
|
||||||
@@ -179,14 +264,28 @@ function overviewTab() {
|
|||||||
'重点表:',
|
'重点表:',
|
||||||
{
|
{
|
||||||
type: 'tpl',
|
type: 'tpl',
|
||||||
tpl: '<span class="font-bold font-mono">${PADSTART(unReceive.focus, 3)}, ${PADSTART(unSchedule.focus, 3)}</span>',
|
tpl: '<span class="font-bold font-mono">${PADSTART(unReceive.focus, 3)}</span>',
|
||||||
},
|
},
|
||||||
|
versionDetailDialog('unReceive.focus', 'unReceive_focus'),
|
||||||
|
',',
|
||||||
|
{
|
||||||
|
type: 'tpl',
|
||||||
|
tpl: '<span class="font-bold font-mono">${PADSTART(unSchedule.focus, 3)}</span>',
|
||||||
|
},
|
||||||
|
versionDetailDialog('unSchedule.focus', 'unScheduled_focus'),
|
||||||
'<br/>',
|
'<br/>',
|
||||||
'普通表:',
|
'普通表:',
|
||||||
{
|
{
|
||||||
type: 'tpl',
|
type: 'tpl',
|
||||||
tpl: '<span class="font-bold font-mono">${PADSTART(unReceive.normal, 3)}, ${PADSTART(unSchedule.normal, 3)}</span>',
|
tpl: '<span class="font-bold font-mono">${PADSTART(unReceive.normal, 3)}</span>',
|
||||||
},
|
},
|
||||||
|
versionDetailDialog('unReceive.normal', 'unReceive_normal'),
|
||||||
|
',',
|
||||||
|
{
|
||||||
|
type: 'tpl',
|
||||||
|
tpl: '<span class="font-bold font-mono">${PADSTART(unSchedule.normal, 3)}</span>',
|
||||||
|
},
|
||||||
|
versionDetailDialog('unSchedule.normal', 'unScheduled_normal'),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user