移除topic 限流

This commit is contained in:
许晓东
2021-11-27 20:49:46 +08:00
parent 34c87997d1
commit e881c58a8f
5 changed files with 40 additions and 16 deletions

View File

@@ -18,7 +18,23 @@
:label-col="{ span: 5 }"
:wrapper-col="{ span: 12 }"
>
<a-form-item label="选择分区">
<a-form-item label="操作">
<a-radio-group
@change="onChange"
v-decorator="[
'operation',
{
initialValue: 'ON',
rules: [{ required: true, message: '请选择一个操作!' }],
},
]"
>
<a-radio value="ON"> 配置限流 </a-radio>
<a-radio value="OFF"> 移除所有分区限流配置 </a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="选择分区" v-show="showPartition">
<a-select
mode="multiple"
option-filter-prop="children"
@@ -36,20 +52,6 @@
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="操作">
<a-radio-group
v-decorator="[
'operation',
{
initialValue: 'ON',
rules: [{ required: true, message: '请选择一个操作!' }],
},
]"
>
<a-radio value="ON"> 开启限流配置 </a-radio>
<a-radio value="OFF"> 移除限流配置 </a-radio>
</a-radio-group>
</a-form-item>
</a-form>
<hr />
<h4>说明:</h4>
@@ -93,6 +95,7 @@ export default {
loading: false,
form: this.$form.createForm(this, { name: "RemoveThrottleForm" }),
partitions: [],
showPartition: true,
};
},
watch: {
@@ -100,6 +103,7 @@ export default {
this.show = v;
if (this.show) {
this.getPartitionInfo();
this.showPartition = true;
}
},
},
@@ -128,7 +132,7 @@ export default {
ok() {
this.form.validateFields((err, values) => {
if (!err) {
const data = Object.assign({}, values, {topic: this.topic});
const data = Object.assign({}, values, { topic: this.topic });
this.loading = true;
request({
url: KafkaTopicApi.configThrottle.url,
@@ -149,6 +153,9 @@ export default {
}
});
},
onChange(e) {
this.showPartition = !(e.target.value == "OFF");
},
},
};
</script>

View File

@@ -57,6 +57,10 @@
<span style="color: red">运维->副本变更详情</span>
处查看也可以在那里将正在进行的任务取消
</p>
<p>
*如果是减少副本不用限流如果是增加副本数副本同步的时候如果有大量消息需要同步可能占用大量带宽担心会影响集群的稳定考虑是否开启限流同步完成可以再把该topic的限流关毕关闭操作可以点击
限流按钮 处理
</p>
</a-spin>
</div>
</a-modal>