Unverified Commit 70555c74 authored by zhu-mingye's avatar zhu-mingye Committed by GitHub

[fix] Fix regcenter clusterconfig (#2220)

* fix regcenter clusterconfig bug * modify layout
parent 0a0a832f
...@@ -333,7 +333,7 @@ export default { ...@@ -333,7 +333,7 @@ export default {
'rc.cc.start': 'Start Session Cluster', 'rc.cc.start': 'Start Session Cluster',
'rc.cc.baseConfig': 'Basic Config', 'rc.cc.baseConfig': 'Basic Config',
'rc.cc.hadoopConfig': 'Hadoop Config', 'rc.cc.hadoopConfig': 'Hadoop Config',
'rc.cc.hadoop.defineConfig': 'Hadoop Custom Config (high priority))', 'rc.cc.hadoop.defineConfig': 'Hadoop Custom Config (high priority)',
'rc.cc.hadoopConfigPath': 'Hadoop Config file path', 'rc.cc.hadoopConfigPath': 'Hadoop Config file path',
'rc.cc.hadoopConfigPathPlaceholder': 'Please enter the hadoop configuration file path, such as /etc/hadoop/conf! ', 'rc.cc.hadoopConfigPathPlaceholder': 'Please enter the hadoop configuration file path, such as /etc/hadoop/conf! ',
'rc.cc.hadoopConfigPathHelp': 'Specify the configuration file path (without / at the end), the following files need to be included: core-site.xml, hdfs-site.xml, yarn-site.xml! ', 'rc.cc.hadoopConfigPathHelp': 'Specify the configuration file path (without / at the end), the following files need to be included: core-site.xml, hdfs-site.xml, yarn-site.xml! ',
...@@ -341,7 +341,7 @@ export default { ...@@ -341,7 +341,7 @@ export default {
'rc.cc.libPathPlaceholder': 'Please enter the hdfs path of lib! Values such as hdfs:///flink/lib', 'rc.cc.libPathPlaceholder': 'Please enter the hdfs path of lib! Values such as hdfs:///flink/lib',
'rc.cc.libPathHelp': 'Specify the hdfs path of lib (without / at the end), which needs to include the dependencies of Flink runtime', 'rc.cc.libPathHelp': 'Specify the hdfs path of lib (without / at the end), which needs to include the dependencies of Flink runtime',
'rc.cc.flinkConfig': 'Flink Config', 'rc.cc.flinkConfig': 'Flink Config',
'rc.cc.flink.defineConfig': 'Flink Custom Config (high priority))', 'rc.cc.flink.defineConfig': 'Flink Custom Config (high priority)',
'rc.cc.flinkConfigPath': 'Flink Config File Path', 'rc.cc.flinkConfigPath': 'Flink Config File Path',
'rc.cc.flinkConfigPathPlaceholder': 'Please enter the flink-conf.yaml path! Values such as /opt/module/flink/conf ', 'rc.cc.flinkConfigPathPlaceholder': 'Please enter the flink-conf.yaml path! Values such as /opt/module/flink/conf ',
'rc.cc.flinkConfigPathHelp': 'Please enter flink-conf.yaml path! Values such as /opt/module/flink/conf ', 'rc.cc.flinkConfigPathHelp': 'Please enter flink-conf.yaml path! Values such as /opt/module/flink/conf ',
......
...@@ -330,7 +330,7 @@ export default { ...@@ -330,7 +330,7 @@ export default {
'rc.cc.start': '启动 Session 集群', 'rc.cc.start': '启动 Session 集群',
'rc.cc.baseConfig': '基本配置', 'rc.cc.baseConfig': '基本配置',
'rc.cc.hadoopConfig': 'Hadoop 配置', 'rc.cc.hadoopConfig': 'Hadoop 配置',
'rc.cc.hadoop.defineConfig': 'Hadoop 自定义配置(高优先级))', 'rc.cc.hadoop.defineConfig': 'Hadoop 自定义配置(高优先级)',
'rc.cc.hadoopConfigPath': 'Hadoop 配置文件路径', 'rc.cc.hadoopConfigPath': 'Hadoop 配置文件路径',
'rc.cc.hadoopConfigPathPlaceholder': '请输入 hadoop 配置文件路径 ,值如 /etc/hadoop/conf!', 'rc.cc.hadoopConfigPathPlaceholder': '请输入 hadoop 配置文件路径 ,值如 /etc/hadoop/conf!',
'rc.cc.hadoopConfigPathHelp': '指定配置文件路径(末尾无/),需要包含以下文件:core-site.xml,hdfs-site.xml,yarn-site.xml !', 'rc.cc.hadoopConfigPathHelp': '指定配置文件路径(末尾无/),需要包含以下文件:core-site.xml,hdfs-site.xml,yarn-site.xml !',
...@@ -338,7 +338,7 @@ export default { ...@@ -338,7 +338,7 @@ export default {
'rc.cc.libPathPlaceholder': '请输入 lib 的 hdfs 路径!值如 hdfs:///flink/lib', 'rc.cc.libPathPlaceholder': '请输入 lib 的 hdfs 路径!值如 hdfs:///flink/lib',
'rc.cc.libPathHelp': '指定 lib 的 hdfs 路径(末尾无/),需要包含 Flink 运行时的依赖', 'rc.cc.libPathHelp': '指定 lib 的 hdfs 路径(末尾无/),需要包含 Flink 运行时的依赖',
'rc.cc.flinkConfig': 'Flink 配置', 'rc.cc.flinkConfig': 'Flink 配置',
'rc.cc.flink.defineConfig': 'Flink 自定义配置(高优先级))', 'rc.cc.flink.defineConfig': 'Flink 自定义配置(高优先级)',
'rc.cc.flinkConfigPath': 'Flink 配置文件路径', 'rc.cc.flinkConfigPath': 'Flink 配置文件路径',
'rc.cc.flinkConfigPathPlaceholder': '请输入 flink-conf.yaml 路径!值如 /opt/module/flink/conf ', 'rc.cc.flinkConfigPathPlaceholder': '请输入 flink-conf.yaml 路径!值如 /opt/module/flink/conf ',
'rc.cc.flinkConfigPathHelp': '请输入 flink-conf.yaml 路径!值如 /opt/module/flink/conf ', 'rc.cc.flinkConfigPathHelp': '请输入 flink-conf.yaml 路径!值如 /opt/module/flink/conf ',
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* *
*/ */
import {Col, Divider, Row} from "antd"; import {Col, Divider, Row, Space} from "antd";
import {ProCard, ProFormGroup, ProFormItem, ProFormList, ProFormSelect, ProFormText} from "@ant-design/pro-components"; import {ProCard, ProFormGroup, ProFormItem, ProFormList, ProFormSelect, ProFormText} from "@ant-design/pro-components";
import {l} from "@/utils/intl"; import {l} from "@/utils/intl";
import React from "react"; import React from "react";
...@@ -50,20 +50,9 @@ const FlinkK8s = (props: { type: string, value: any }) => { ...@@ -50,20 +50,9 @@ const FlinkK8s = (props: { type: string, value: any }) => {
key={item.name} key={item.name}
name={['configJson', 'kubernetesConfig','configuration', item.name]} name={['configJson', 'kubernetesConfig','configuration', item.name]}
label={item.label} label={item.label}
width={250} width={260}
placeholder={item.placeholder}/> placeholder={item.placeholder}/>
)} )}
<ProFormList
name={['configJson','flinkConfig', 'flinkConfigList']}
copyIconProps={false}
deleteIconProps={{tooltipText: l('rc.cc.deleteConfig'),}}
creatorButtonProps={{style: {width: '32vw'}, creatorButtonText: l('rc.cc.addConfig'),}}
>
<ProFormGroup key="flinkGroup">
<ProFormText width={'md'} name="name" label={l('rc.cc.key')}/>
<ProFormText width={'sm'} name="value" label={l('rc.cc.value')}/>
</ProFormGroup>
</ProFormList>
</> </>
}; };
...@@ -73,7 +62,7 @@ const FlinkK8s = (props: { type: string, value: any }) => { ...@@ -73,7 +62,7 @@ const FlinkK8s = (props: { type: string, value: any }) => {
label: <TagAlignCenter>Default Pod Template</TagAlignCenter>, label: <TagAlignCenter>Default Pod Template</TagAlignCenter>,
children: children:
<ProFormItem key="dpe" name={['configJson', 'kubernetesConfig', 'podTemplate']}> <ProFormItem key="dpe" name={['configJson', 'kubernetesConfig', 'podTemplate']}>
<CodeEdit {...CodeEditProps} code={value.configJson.kubernetesConfig.podTemplate}/> <CodeEdit {...CodeEditProps} code={value.configJson?.kubernetesConfig.podTemplate ?? ''}/>
</ProFormItem> </ProFormItem>
}, },
{ {
...@@ -81,7 +70,7 @@ const FlinkK8s = (props: { type: string, value: any }) => { ...@@ -81,7 +70,7 @@ const FlinkK8s = (props: { type: string, value: any }) => {
label: <TagAlignCenter>JM Pod Template</TagAlignCenter>, label: <TagAlignCenter>JM Pod Template</TagAlignCenter>,
children: children:
<ProFormItem key="jmdpe" name={['configJson', 'kubernetesConfig', 'jmPodTemplate']}> <ProFormItem key="jmdpe" name={['configJson', 'kubernetesConfig', 'jmPodTemplate']}>
<CodeEdit {...CodeEditProps} code={value.configJson.kubernetesConfig.jmPodTemplate}/> <CodeEdit {...CodeEditProps} code={value.configJson?.kubernetesConfig.jmPodTemplate ?? ''}/>
</ProFormItem> </ProFormItem>
}, },
{ {
...@@ -89,7 +78,7 @@ const FlinkK8s = (props: { type: string, value: any }) => { ...@@ -89,7 +78,7 @@ const FlinkK8s = (props: { type: string, value: any }) => {
label: <TagAlignCenter>TM Pod Template</TagAlignCenter>, label: <TagAlignCenter>TM Pod Template</TagAlignCenter>,
children: children:
<ProFormItem key="tmdpe" name={['configJson', 'kubernetesConfig', 'tmPodTemplate']}> <ProFormItem key="tmdpe" name={['configJson', 'kubernetesConfig', 'tmPodTemplate']}>
<CodeEdit {...CodeEditProps} code={value.configJson.kubernetesConfig.tmPodTemplate}/> <CodeEdit {...CodeEditProps} code={value.configJson?.kubernetesConfig.tmPodTemplate ?? ''}/>
</ProFormItem> </ProFormItem>
}, },
]; ];
...@@ -118,6 +107,19 @@ const FlinkK8s = (props: { type: string, value: any }) => { ...@@ -118,6 +107,19 @@ const FlinkK8s = (props: { type: string, value: any }) => {
/>} />}
{renderK8sConfig()} {renderK8sConfig()}
</ProFormGroup> </ProFormGroup>
<ProFormList
name={['configJson','flinkConfig', 'flinkConfigList']}
copyIconProps={false}
deleteIconProps={{tooltipText: l('rc.cc.deleteConfig'),}}
creatorButtonProps={{style: {width: '100%'}, creatorButtonText: l('rc.cc.addConfig'),}}
>
<ProFormGroup key="flinkGroup" >
<Space key={'config'} style={{display: 'flex'}} align="baseline">
<ProFormText width={'md'} name="name" placeholder={l('rc.cc.key')}/>
<ProFormText width={'sm'} name="value" placeholder={l('rc.cc.value')}/>
</Space>
</ProFormGroup>
</ProFormList>
</Col> </Col>
<ProCard.Divider type={'vertical'}/> <ProCard.Divider type={'vertical'}/>
<Col span={12}> <Col span={12}>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
*/ */
import {Col, Divider, Row} from "antd"; import {Col, Divider, Row, Space} from "antd";
import {l} from "@/utils/intl"; import {l} from "@/utils/intl";
import {ProCard, ProFormGroup, ProFormList, ProFormText} from "@ant-design/pro-components"; import {ProCard, ProFormGroup, ProFormList, ProFormText} from "@ant-design/pro-components";
import React from "react"; import React from "react";
...@@ -46,13 +46,15 @@ const YarnConfig = () => { ...@@ -46,13 +46,15 @@ const YarnConfig = () => {
tooltipText: l('rc.cc.deleteConfig'), tooltipText: l('rc.cc.deleteConfig'),
}} }}
creatorButtonProps={{ creatorButtonProps={{
style: {width: '26vw'}, style: {width: '100%'},
creatorButtonText: l('rc.cc.addConfig'), creatorButtonText: l('rc.cc.addConfig'),
}} }}
> >
<ProFormGroup key="hadoopGroup"> <ProFormGroup key="hadoopGroup" style={{ width: '100%'}}>
<ProFormText width={'sm'} name="name" label={l('rc.cc.key')}/> <Space key={'config'} style={{width: '100%'}} align="baseline">
<ProFormText width={'sm'} name="value" label={l('rc.cc.value')}/> <ProFormText width={'md'} name="name" placeholder={l('rc.cc.key')}/>
<ProFormText width={'sm'} name="value" placeholder={l('rc.cc.value')}/>
</Space>
</ProFormGroup> </ProFormGroup>
</ProFormList> </ProFormList>
</Col> </Col>
...@@ -89,13 +91,15 @@ const YarnConfig = () => { ...@@ -89,13 +91,15 @@ const YarnConfig = () => {
tooltipText: l('rc.cc.deleteConfig'), tooltipText: l('rc.cc.deleteConfig'),
}} }}
creatorButtonProps={{ creatorButtonProps={{
style: {width: '40vw'}, style: {width: '100%'},
creatorButtonText: l('rc.cc.addConfig'), creatorButtonText: l('rc.cc.addConfig'),
}} }}
> >
<ProFormGroup key="flinkGroup"> <ProFormGroup key="flinkGroup" style={{display: 'flex',width: '100%'}}>
<ProFormText width={'md'} name="name" label={l('rc.cc.key')}/> <Space key={'config'} style={{display: 'flex'}} align="baseline">
<ProFormText width={'md'} name="value" label={l('rc.cc.value')}/> <ProFormText width={'md'} name="name" placeholder={l('rc.cc.key')}/>
<ProFormText width={'sm'} name="value" placeholder={l('rc.cc.value')}/>
</Space>
</ProFormGroup> </ProFormGroup>
</ProFormList> </ProFormList>
</Col> </Col>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment