158 lines
6.4 KiB
JavaScript
158 lines
6.4 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(),
|
|
}
|
|
}
|
|
},
|
|
{
|
|
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路径',
|
|
autoComplete: '${base}/table/all_hdfs?key=$term',
|
|
}
|
|
]
|
|
},
|
|
{
|
|
type: 'form',
|
|
title: '提交压缩任务',
|
|
api: {
|
|
method: 'post',
|
|
// url: '${base}/schedule/table_batch',
|
|
dataType: 'form',
|
|
},
|
|
body: [
|
|
{
|
|
type: 'group',
|
|
body: [
|
|
flinkJobIdTextInput(),
|
|
aliasTextInput(),
|
|
]
|
|
},
|
|
{
|
|
type: 'group',
|
|
body: [
|
|
{
|
|
name: 'xxxx',
|
|
type: 'radios',
|
|
label: '优先指定集群',
|
|
selectFirst: true,
|
|
options: [
|
|
{label: '无', value: 'undefined'},
|
|
{label: 'b1', value: 'b1'},
|
|
{label: 'b5', value: 'b5'},
|
|
{label: 'a4', value: 'a4'},
|
|
]
|
|
},
|
|
{
|
|
name: 'xxx',
|
|
type: 'radios',
|
|
label: '强制指定集群',
|
|
selectFirst: true,
|
|
options: [
|
|
{label: '无', value: 'undefined'},
|
|
{label: 'b1', value: 'b1'},
|
|
{label: 'b1', value: 'b1'},
|
|
{label: 'b5', value: 'b5'},
|
|
{label: 'a4', value: 'a4'},
|
|
]
|
|
},
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
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,
|
|
}
|
|
]
|
|
},
|
|
]
|
|
}
|
|
} |