From 43b1933d4f2eb313bf3c6b9e6954196483298623 Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Tue, 11 Jul 2023 10:51:20 +0800 Subject: [PATCH] =?UTF-8?q?feature(web):=20=E5=A2=9E=E5=8A=A0=E5=8D=95?= =?UTF-8?q?=E4=B8=AA=E8=A1=A8=E5=8E=8B=E7=BC=A9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/components/common.js | 22 +++++++++++++++++ web/components/table-tab.js | 15 ++---------- web/components/tool-tab.js | 48 +++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 13 deletions(-) diff --git a/web/components/common.js b/web/components/common.js index e72addb..9c9e902 100644 --- a/web/components/common.js +++ b/web/components/common.js @@ -1925,3 +1925,25 @@ function filterableField(mapping, multiple = false) { ] } } + +function flinkJobIdTextInput() { + return { + type: 'input-text', + name: 'flinkJobId', + label: 'Flink job id', + placeholder: '通过 ID 搜索', + clearable: true, + autoComplete: '${base}/table/all_flink_job_id?key=$term', + } +} + +function aliasTextInput() { + return { + type: 'input-text', + name: 'alias', + label: '别名', + placeholder: '通过别名搜索', + clearable: true, + autoComplete: '${base}/table/all_alias?key=$term', + } +} diff --git a/web/components/table-tab.js b/web/components/table-tab.js index 435155a..b8a5009 100644 --- a/web/components/table-tab.js +++ b/web/components/table-tab.js @@ -26,29 +26,18 @@ function tableTab() { ...crudCommonOptions(), // interval: 10000, filter: { - mode: 'inline', title: '表筛选', body: [ { type: 'group', body: [ { - type: 'input-text', - name: 'flinkJobId', - label: 'Flink job id', - placeholder: '通过 ID 搜索', + ...flinkJobIdTextInput(), size: 'md', - clearable: true, - autoComplete: '${base}/table/all_flink_job_id?key=$term', }, { - type: 'input-text', - name: 'alias', - label: '别名', - placeholder: '通过别名搜索', + ...aliasTextInput(), size: 'md', - clearable: true, - autoComplete: '${base}/table/all_alias?key=$term', }, ] }, diff --git a/web/components/tool-tab.js b/web/components/tool-tab.js index ff68122..0203fea 100644 --- a/web/components/tool-tab.js +++ b/web/components/tool-tab.js @@ -84,6 +84,54 @@ function toolTab() { } ] }, + { + 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: '批量提交压缩任务',