Compare commits

..

2 Commits

Author SHA1 Message Date
TangShan_DD f5ea9b82c8 Merge branch 'catl' of http://23.33.3.13:30000/efc/cop-web into catl 2024-11-12 15:29:22 +08:00
TangShan_DD 1a4b5fb517 fix: 修改kafkaZK路径必填和topic名称校验 2024-11-12 15:28:33 +08:00
1 changed files with 8 additions and 7 deletions

View File

@ -15,18 +15,18 @@
</el-select> </el-select>
</basic-form-item> </basic-form-item>
</el-col> </el-col>
<el-col :span="12"> <!-- <el-col :span="12">
<basic-form-item label="是否安装Exporter" show-overflow-tooltip> <basic-form-item label="是否安装Exporter" show-overflow-tooltip>
<el-radio-group v-model="itemData.install_jmx_exporter"> <el-radio-group v-model="itemData.install_jmx_exporter">
<el-radio :label="true"></el-radio> <el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio> <el-radio :label="false"></el-radio>
</el-radio-group> </el-radio-group>
</basic-form-item> </basic-form-item>
</el-col> </el-col> -->
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<basic-form-item label="ZK路径" prop="manage_config.kafka_zookeeper_connection_string" validate="required" :rules="rule"> <basic-form-item label="ZK路径" prop="manage_config.kafka_zookeeper_connection_string" :rules="isTemplate ? [] : rule">
<el-input type="textarea" v-model="itemData.manage_config.kafka_zookeeper_connection_string" placeholder="192.168.1.1:2181,192.168.1.2:2181"></el-input> <el-input type="textarea" v-model="itemData.manage_config.kafka_zookeeper_connection_string" placeholder="192.168.1.1:2181,192.168.1.2:2181"></el-input>
</basic-form-item> </basic-form-item>
</el-col> </el-col>
@ -74,7 +74,7 @@ export default {
type: Object, type: Object,
default: function () { default: function () {
return { return {
install_jmx_exporter: true, install_jmx_exporter: false,
manage_config: { manage_config: {
kafka_scala_version: '', kafka_scala_version: '',
kafka_zookeeper_connection_string: '' kafka_zookeeper_connection_string: ''
@ -98,12 +98,13 @@ export default {
{ {
pattern: /^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5]):([1-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]),?)*$/, pattern: /^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5]):([1-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]),?)*$/,
message: '请按照提示输入正确的格式' message: '请按照提示输入正确的格式'
} },
{ required: true, message: '请输入ZK路径', trigger: 'blur' }
], ],
topicRule: [ topicRule: [
{ {
pattern: /^[a-zA-Z-]+$/, pattern: /^[a-zA-Z0-9._-]+$/,
message: '请输入英文和中划线' message: '请输入英文大小写、数字和特殊字符 - . _ 的组合'
} }
] ]
} }