125 lines
4.8 KiB
JavaScript
125 lines
4.8 KiB
JavaScript
function toolTab() {
|
|
return {
|
|
title: `小工具`,
|
|
tab: [
|
|
{
|
|
type: 'form',
|
|
title: '查询时间线',
|
|
actions: [
|
|
{
|
|
type: 'submit',
|
|
label: '查询',
|
|
actionType: 'dialog',
|
|
dialog: {
|
|
title: 'Hudi 表时间线',
|
|
actions: [],
|
|
size: 'lg',
|
|
body: {
|
|
type: 'crud',
|
|
api: {
|
|
method: 'get',
|
|
url: '${base}/hudi/timeline/list_hdfs',
|
|
data: {
|
|
page: '${page|default:undefined}',
|
|
count: '${perPage|default:undefined}',
|
|
order: '${orderBy|default:undefined}',
|
|
direction: '${orderDir|default:undefined}',
|
|
hdfs: '${hdfs|default:undefined}',
|
|
filter_type: "${type|default:active}",
|
|
filter_action: '${action|default:undefined}',
|
|
filter_state: '${state|default:undefined}',
|
|
},
|
|
},
|
|
...crudCommonOptions(),
|
|
perPage: 50,
|
|
headerToolbar: [
|
|
"reload",
|
|
paginationCommonOptions(undefined, 10),
|
|
],
|
|
footerToolbar: [
|
|
paginationCommonOptions(undefined, 10),
|
|
],
|
|
columns: timelineColumns(),
|
|
}
|
|
}
|
|
}
|
|
],
|
|
body: [
|
|
{
|
|
type: 'input-text',
|
|
name: 'hdfs',
|
|
label: 'HDFS路经',
|
|
required: true,
|
|
clearable: true,
|
|
description: '输入表HDFS路径',
|
|
}
|
|
]
|
|
},
|
|
{
|
|
type: 'form',
|
|
title: '查询表结构',
|
|
actions: [
|
|
{
|
|
type: 'submit',
|
|
label: '查询',
|
|
actionType: 'dialog',
|
|
dialog: {
|
|
title: 'Hudi 表结构',
|
|
actions: [],
|
|
size: 'lg',
|
|
body: {
|
|
type: 'service',
|
|
api: {
|
|
method: 'get',
|
|
url: '${base}/hudi/schema',
|
|
data: {
|
|
hdfs: '${hdfs|default:undefined}',
|
|
},
|
|
},
|
|
body: {
|
|
type: 'page',
|
|
body: {
|
|
type: 'json',
|
|
source: '${detail}',
|
|
levelExpand: 3,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
body: [
|
|
{
|
|
type: 'input-text',
|
|
name: 'hdfs',
|
|
label: 'HDFS路经',
|
|
required: true,
|
|
clearable: true,
|
|
description: '输入表HDFS路径',
|
|
}
|
|
]
|
|
},
|
|
{
|
|
type: 'form',
|
|
title: '批量提交压缩任务',
|
|
api: {
|
|
method: 'post',
|
|
url: '${base}/schedule/table_batch',
|
|
dataType: 'form',
|
|
},
|
|
body: [
|
|
{
|
|
name: 'lines',
|
|
type: 'textarea',
|
|
label: '表信息 (flink_job_id alias\\n)',
|
|
clearable: true,
|
|
minRows: 5,
|
|
maxRows: 5,
|
|
className: 'no-resize',
|
|
required: true,
|
|
}
|
|
]
|
|
},
|
|
]
|
|
}
|
|
} |