refactor(web): 优化 Flink 相关信息查询

This commit is contained in:
2023-05-05 23:05:51 +08:00
parent 1dde155fac
commit 47b3656d73
4 changed files with 224 additions and 52 deletions

View File

@@ -185,6 +185,7 @@ function simpleYarnDialog(cluster, title, filterField) {
name: `\${${filterField}}`,
}
},
silentPolling: false,
body: [
{
type: 'wrapper',
@@ -200,31 +201,54 @@ function simpleYarnDialog(cluster, title, filterField) {
url: '${current.trackingUrl}'
}
},
silentPolling: false,
body: [
{
type: 'property',
title: 'Flink 基本信息',
column: 4,
items: [
{label: 'Flink 版本', content: '${detail.overview.flinkVersion}'},
{label: 'Flink 小版本', content: '${detail.overview.flinkCommit}', span: 3},
{label: '运行中', content: '${detail.overview.jobsRunning}'},
{label: '已结束', content: '${detail.overview.jobsFinished}'},
{label: '已失败', content: '${detail.overview.jobsFailed}'},
{label: '被取消', content: '${detail.overview.jobsCanceled}'},
{label: 'Slot (可用/总数)', content: '${detail.overview.slotsAvailable}/${detail.overview.slotsTotal}', span: 4},
{label: 'Flink 版本', content: '${detail.flinkVersion}'},
{label: 'Flink 小版本', content: '${detail.flinkCommit}', span: 3},
{label: '运行中', content: '${detail.jobsRunning}'},
{label: '已结束', content: '${detail.jobsFinished}'},
{label: '已失败', content: '${detail.jobsFailed}'},
{label: '被取消', content: '${detail.jobsCanceled}'},
{label: 'Slot (可用/总数)', content: '${detail.slotsAvailable}/${detail.slotsTotal}', span: 4},
]
},
]
},
{
type: 'service',
api: {
method: 'get',
url: '${base}/flink/jobs',
data: {
url: '${current.trackingUrl}'
}
},
silentPolling: false,
body: [
{
type: 'table',
title: '任务详情',
source: '${detail.jobs}',
source: '${items}',
affixHeader: false,
columns: [
{
name: 'name',
label: '名称',
width: 2000,
},
{
label: 'Checkpoint',
width: 60,
align: 'center',
fixed: 'right',
type: 'tpl',
tpl: "${IF(checkpointMetrics, checkpointMetrics.complete + '/' + checkpointMetrics.inProgress +'/' + checkpointMetrics.failed, '-')}",
},
{
name: 'metrics.readRecords',
label: '读记录数',
@@ -242,7 +266,7 @@ function simpleYarnDialog(cluster, title, filterField) {
]
}
]
}
},
]
},
{