feature(yarn-query,web): 新增 yarn 多集群查询

可以联合或单独查询 yarn 集群,并且聚合过滤排序等数据筛选内容
This commit is contained in:
2023-05-05 11:52:09 +08:00
parent 49a77a3795
commit 027fa10d50
24 changed files with 348 additions and 269 deletions

View File

@@ -11,7 +11,7 @@ function yarnCrudColumns() {
{
name: 'id',
label: 'ID',
width: 240,
width: 250,
fixed: 'left',
...copyField('id')
},
@@ -21,12 +21,19 @@ function yarnCrudColumns() {
fixed: 'left',
...copyField('name')
},
{
name: 'cluster',
label: '集群',
width: 50,
align: 'center',
},
{
label: '用户',
width: 80,
type: 'tooltip-wrapper',
body: '${TRUNCATE(user, 8)}',
content: '${user}',
align: 'center',
},
{
name: 'startedTime',
@@ -162,7 +169,7 @@ function yarnCrudColumns() {
]
}
function simpleYarnDialog(mode, title) {
function simpleYarnDialog(cluster, title, filterField) {
return {
title: title,
actions: [],
@@ -194,8 +201,9 @@ function simpleYarnDialog(mode, title) {
type: 'crud',
api: {
method: 'get',
url: `\${base}/${mode}_yarn/job_list`,
url: `\${base}/yarn/job_list`,
data: {
clusters: `${cluster}`,
page: '${page|default:undefined}',
count: '${perPage|default:undefined}',
order: '${orderBy|default:undefined}',
@@ -203,7 +211,7 @@ function simpleYarnDialog(mode, title) {
filter_state: '${state|default:undefined}',
filter_final_status: '${finalStatus|default:undefined}',
search_id: '${id|default:undefined}',
search_name: `\${${mode}JobName}`,
search_name: `\${${filterField}}`,
precise: true,
}
},
@@ -286,7 +294,7 @@ function flinkJobDialog() {
type: 'action',
label: '打开同步详情',
actionType: 'dialog',
dialog: simpleYarnDialog('sync', '同步详情')
dialog: simpleYarnDialog('b5-sync', '同步详情', 'syncJobName')
},
{type: 'divider'},
{
@@ -386,14 +394,14 @@ function tableMetaDialog() {
type: 'action',
icon: 'fa fa-arrows-rotate',
actionType: 'dialog',
dialog: simpleYarnDialog('sync', '同步详情')
dialog: simpleYarnDialog('b5-sync', '同步详情', 'syncJobName')
},
{
label: '压缩情况',
type: 'action',
icon: 'fa fa-minimize',
actionType: 'dialog',
dialog: simpleYarnDialog('compaction', '压缩详情')
dialog: simpleYarnDialog('b1', '压缩详情', 'compactionJobName')
},
{
type: 'button',