fix: 软件安装kafka增加参数
parent
f3e2eece29
commit
fdc904ef96
|
@ -4,16 +4,14 @@
|
|||
<el-col :span="12">
|
||||
<basic-form-item label="软件版本:" prop="version" validate="required">
|
||||
<el-select v-model="itemData.version" placeholder="版本">
|
||||
<el-option v-for="(row,index) in versionData" :key="index" :label="row.name" :value="row.value">
|
||||
</el-option>
|
||||
<el-option v-for="(row, index) in versionData" :key="index" :label="row.name" :value="row.value"> </el-option>
|
||||
</el-select>
|
||||
</basic-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<basic-form-item label="scala版本:" prop="manage_config.kafka_scala_version" validate="required">
|
||||
<el-select v-model="itemData.manage_config.kafka_scala_version" placeholder="版本">
|
||||
<el-option v-for="(row,index) in scalaVersionData" :key="index" :label="row.name" :value="row.value">
|
||||
</el-option>
|
||||
<el-option v-for="(row, index) in scalaVersionData" :key="index" :label="row.name" :value="row.value"> </el-option>
|
||||
</el-select>
|
||||
</basic-form-item>
|
||||
</el-col>
|
||||
|
@ -28,19 +26,49 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<basic-form-item label="ZK路径:" prop="manage_config.kafka_zookeeper_connection_string" validate="required" :rule="rule">
|
||||
<basic-form-item label="ZK路径:" prop="manage_config.kafka_zookeeper_connection_string" validate="required" :rules="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>
|
||||
</basic-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" class="line"></el-col>
|
||||
<el-col :span="24" class="title">
|
||||
创建topic
|
||||
<el-button :disabled="isPreview" class="m-l" type="primary" size="mini" @click="addTopic(itemData.topics)">新增</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in itemData.topics" :key="index" class="search-container">
|
||||
<el-button type="text" :disabled="isPreview" class="del_operate" @click="removeItem(itemData.topics, index, 'required')">
|
||||
<i class="el-icon-delete" />
|
||||
</el-button>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<basic-form-item label="复本数:" :prop="'topics.' + index + '.replication'" validate="required" required-message="请输入复本数">
|
||||
<el-input-number v-model="item.replication" :min="1" :step-strictly="true" :precision="0"></el-input-number>
|
||||
</basic-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<basic-form-item label="分片数:" :prop="'topics.' + index + '.partitions'" validate="required" required-message="请输入分片数">
|
||||
<el-input-number v-model="item.partitions" :min="1" :step-strictly="true" :precision="0"></el-input-number>
|
||||
</basic-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<basic-form-item label="topic名称:" :prop="'topics.' + index + '.topic_name'" validate="required" :rules="topicRule">
|
||||
<el-input v-model="item.topic_name"></el-input>
|
||||
</basic-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</basic-form>
|
||||
</template>
|
||||
<script>
|
||||
import node from '../../mixins/index';
|
||||
import node from '../../mixins/index'
|
||||
import show from '../../mixins/show'
|
||||
import { getDictChildren } from 'services/system/dictionary'
|
||||
import software from '../mixins/itemOperate'
|
||||
export default {
|
||||
mixins: [node, show],
|
||||
mixins: [node, show, software],
|
||||
props: {
|
||||
itemData: {
|
||||
type: Object,
|
||||
|
@ -50,7 +78,14 @@ export default {
|
|||
manage_config: {
|
||||
kafka_scala_version: '',
|
||||
kafka_zookeeper_connection_string: ''
|
||||
},
|
||||
topics: [
|
||||
{
|
||||
replication: 1,
|
||||
partitions: 1,
|
||||
topic_name: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,21 +99,35 @@ 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]),?)*$/,
|
||||
message: '请按照提示输入正确的格式'
|
||||
}
|
||||
],
|
||||
topicRule: [
|
||||
{
|
||||
pattern: /^[a-zA-Z-]+$/,
|
||||
message: '请输入英文和中划线'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getVersion('KAFKA-VERSION');
|
||||
this.getVersion('SCALA-VERSION');
|
||||
this.getVersion('KAFKA-VERSION')
|
||||
this.getVersion('SCALA-VERSION')
|
||||
},
|
||||
methods: {
|
||||
// 新增topic
|
||||
addTopic(data) {
|
||||
data.push({
|
||||
replication: 1,
|
||||
partitions: 1,
|
||||
topic_name: ''
|
||||
})
|
||||
},
|
||||
getVersion(value) {
|
||||
getDictChildren({ value: value }).then(data => {
|
||||
if (data.success) {
|
||||
if (value === 'KAFKA-VERSION') {
|
||||
this.versionData = data.data
|
||||
} else {
|
||||
this.scalaVersionData = data.data;
|
||||
this.scalaVersionData = data.data
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue