This is an automated email from the ASF dual-hosted git repository.

leezng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 45d98689f [INLONG-6916][Dashboard] MQ type adds partition limit (#6922)
45d98689f is described below

commit 45d98689f146431258eefdd9148cde64daf9a020
Author: Lizhen <[email protected]>
AuthorDate: Mon Dec 19 09:18:22 2022 +0800

    [INLONG-6916][Dashboard] MQ type adds partition limit (#6922)
---
 inlong-dashboard/src/locales/cn.json                 | 1 +
 inlong-dashboard/src/locales/en.json                 | 1 +
 inlong-dashboard/src/metas/groups/defaults/Kafka.ts  | 3 +++
 inlong-dashboard/src/metas/groups/defaults/Pulsar.ts | 4 ++--
 inlong-dashboard/src/metas/groups/defaults/TubeMq.ts | 4 ++++
 5 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/inlong-dashboard/src/locales/cn.json 
b/inlong-dashboard/src/locales/cn.json
index dc2efe6bc..749a2a9b6 100644
--- a/inlong-dashboard/src/locales/cn.json
+++ b/inlong-dashboard/src/locales/cn.json
@@ -337,6 +337,7 @@
   "meta.Group.TubeMq.Stripe/Second": "条/秒",
   "meta.Group.TubeMq.SingleStripMaximumLength": "单条最大长度",
   "meta.Group.Kafka.Partition": "分区数",
+  "meta.Group.Kafka.PartitionExtra": "最大限制为100",
   "meta.Group.Kafka.ReplicationFactor": "副本数",
   "meta.Group.Status.Approved": "审批通过",
   "meta.Group.Status.Draft": "草稿",
diff --git a/inlong-dashboard/src/locales/en.json 
b/inlong-dashboard/src/locales/en.json
index 0f71c1730..138288a71 100644
--- a/inlong-dashboard/src/locales/en.json
+++ b/inlong-dashboard/src/locales/en.json
@@ -337,6 +337,7 @@
   "meta.Group.TubeMq.Stripe/Second": "Stripe / Second",
   "meta.Group.TubeMq.SingleStripMaximumLength": "Single Max Length",
   "meta.Group.Kafka.Partition": "Number of partitions",
+  "meta.Group.Kafka.PartitionExtra": "Maximum limit is 100",
   "meta.Group.Kafka.ReplicationFactor": "Replications",
   "meta.Group.Status.Approved": "Approved",
   "meta.Group.Status.Draft": "Draft",
diff --git a/inlong-dashboard/src/metas/groups/defaults/Kafka.ts 
b/inlong-dashboard/src/metas/groups/defaults/Kafka.ts
index bc7d138b0..71fdf8bfa 100644
--- a/inlong-dashboard/src/metas/groups/defaults/Kafka.ts
+++ b/inlong-dashboard/src/metas/groups/defaults/Kafka.ts
@@ -21,6 +21,7 @@ import { DataWithBackend } from '@/metas/DataWithBackend';
 import { RenderRow } from '@/metas/RenderRow';
 import { RenderList } from '@/metas/RenderList';
 import { GroupInfo } from '../common/GroupInfo';
+import i18n from '@/i18n';
 
 const { I18n } = DataWithBackend;
 const { FieldDecorator } = RenderRow;
@@ -32,8 +33,10 @@ export default class KafkaGroup
   @FieldDecorator({
     type: 'inputnumber',
     rules: [{ required: true }],
+    extra: i18n.t('meta.Group.Kafka.PartitionExtra'),
     props: {
       min: 1,
+      max: 100,
       precision: 0,
     },
   })
diff --git a/inlong-dashboard/src/metas/groups/defaults/Pulsar.ts 
b/inlong-dashboard/src/metas/groups/defaults/Pulsar.ts
index d64c851b4..3b4e4768a 100644
--- a/inlong-dashboard/src/metas/groups/defaults/Pulsar.ts
+++ b/inlong-dashboard/src/metas/groups/defaults/Pulsar.ts
@@ -94,7 +94,7 @@ export default class PulsarGroup
 
   @FieldDecorator({
     type: 'inputnumber',
-    initialValue: 3,
+    initialValue: 1,
     suffix: i18n.t('meta.Group.Pulsar.WriteQuorumSuffix'),
     extra: i18n.t('meta.Group.Pulsar.WriteQuorumExtra'),
     props: {
@@ -108,7 +108,7 @@ export default class PulsarGroup
 
   @FieldDecorator({
     type: 'inputnumber',
-    initialValue: 2,
+    initialValue: 1,
     suffix: i18n.t('meta.Group.Pulsar.AckQuorumSuffix'),
     extra: i18n.t('meta.Group.Pulsar.AckQuorumExtra'),
     props: {
diff --git a/inlong-dashboard/src/metas/groups/defaults/TubeMq.ts 
b/inlong-dashboard/src/metas/groups/defaults/TubeMq.ts
index a9a3ec41d..81730fd7a 100644
--- a/inlong-dashboard/src/metas/groups/defaults/TubeMq.ts
+++ b/inlong-dashboard/src/metas/groups/defaults/TubeMq.ts
@@ -33,6 +33,7 @@ export default class TubeMqGroup
   @FieldDecorator({
     type: 'inputnumber',
     rules: [{ required: true }],
+    initialValue: 1,
     suffix: i18n.t('meta.Group.TubeMq.TenThousand/Day'),
     props: {
       min: 1,
@@ -45,6 +46,7 @@ export default class TubeMqGroup
   @FieldDecorator({
     type: 'inputnumber',
     rules: [{ required: true }],
+    initialValue: 10,
     suffix: i18n.t('meta.Group.TubeMq.GB/Day'),
     props: {
       min: 1,
@@ -57,6 +59,7 @@ export default class TubeMqGroup
   @FieldDecorator({
     type: 'inputnumber',
     rules: [{ required: true }],
+    initialValue: 100,
     suffix: i18n.t('meta.Group.TubeMq.Stripe/Second'),
     props: {
       min: 1,
@@ -69,6 +72,7 @@ export default class TubeMqGroup
   @FieldDecorator({
     type: 'inputnumber',
     rules: [{ required: true }],
+    initialValue: 1024,
     suffix: 'Byte',
     props: {
       min: 1,

Reply via email to