Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INLONG-6916][Dashboard] MQ type adds partition limit #6922

Merged
merged 1 commit into from
Dec 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions inlong-dashboard/src/locales/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,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": "草稿",
Expand Down
1 change: 1 addition & 0 deletions inlong-dashboard/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,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",
Expand Down
3 changes: 3 additions & 0 deletions inlong-dashboard/src/metas/groups/defaults/Kafka.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
},
})
Expand Down
4 changes: 2 additions & 2 deletions inlong-dashboard/src/metas/groups/defaults/Pulsar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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: {
Expand Down
4 changes: 4 additions & 0 deletions inlong-dashboard/src/metas/groups/defaults/TubeMq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -69,6 +72,7 @@ export default class TubeMqGroup
@FieldDecorator({
type: 'inputnumber',
rules: [{ required: true }],
initialValue: 1024,
suffix: 'Byte',
props: {
min: 1,
Expand Down