Skip to content

Commit

Permalink
[INLONG-9016][Dashboard] Change the wrapWithInlongMsg to wrapType in …
Browse files Browse the repository at this point in the history
…data stream (#9019)
  • Loading branch information
bluewang authored Oct 9, 2023
1 parent 2ab581e commit f12b833
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 36 deletions.
4 changes: 2 additions & 2 deletions inlong-dashboard/src/plugins/groups/defaults/Pulsar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class PulsarGroup
{
@FieldDecorator({
type: 'radio',
initialValue: 'SERIAL',
initialValue: 'PARALLEL',
rules: [{ required: true }],
props: {
options: [
Expand Down Expand Up @@ -60,7 +60,7 @@ export default class PulsarGroup
max: 100,
precision: 0,
},
visible: values => values.queueModule === 'PARALLEL',
visible: values => values.queueModule !== 'SERIAL',
})
@I18n('meta.Group.Pulsar.PartitionNum')
partitionNum: number;
Expand Down
12 changes: 6 additions & 6 deletions inlong-dashboard/src/plugins/sinks/defaults/Cls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,27 @@ export default class ClsSink extends SinkInfo implements DataWithBackend, Render
disabled: [110].includes(values?.status),
options: [
{
label: i18n.t('meta.Sinks.Cls.SaveTime.Week'),
label: i18n.t('meta.Sinks.Cls.StorageDuration.Week'),
value: 7,
},
{
label: i18n.t('meta.Sinks.Cls.SaveTime.Month'),
label: i18n.t('meta.Sinks.Cls.StorageDuration.Month'),
value: 30,
},
{
label: i18n.t('meta.Sinks.Cls.SaveTime.HalfAYear'),
label: i18n.t('meta.Sinks.Cls.StorageDuration.HalfAYear'),
value: 182,
},
{
label: i18n.t('meta.Sinks.Cls.SaveTime.OneYear'),
label: i18n.t('meta.Sinks.Cls.StorageDuration.OneYear'),
value: 365,
},
],
}),
})
@I18n('meta.Sinks.Cls.SaveTime')
@I18n('meta.Sinks.Cls.StorageDuration')
@SyncField()
saveTime: number;
storageDuration: number;

@FieldDecorator({
type: NodeSelect,
Expand Down
20 changes: 12 additions & 8 deletions inlong-dashboard/src/plugins/streams/common/StreamDefaultInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,24 +262,28 @@ export class StreamDefaultInfo implements DataWithBackend, RenderRow, RenderList
type: 'radio',
isPro: true,
rules: [{ required: true }],
initialValue: true,
tooltip: i18n.t('meta.Stream.WrapWithInlongMsgHelp'),
initialValue: 'INLONG_MSG_V0',
tooltip: i18n.t('meta.Stream.WrapTypeHelp'),
props: values => ({
disabled: [110].includes(values?.status),
options: [
{
label: i18n.t('basic.Yes'),
value: true,
label: 'InLongMsg V0',
value: 'INLONG_MSG_V0',
},
{
label: i18n.t('basic.No'),
value: false,
label: 'InLongMsg V1',
value: 'INLONG_MSG_V1',
},
{
label: 'Raw',
value: 'RAW',
},
],
}),
})
@I18n('meta.Stream.WrapWithInlongMsg')
wrapWithInlongMsg: boolean;
@I18n('meta.Stream.WrapType')
wrapType: string;

parse(data) {
return data;
Expand Down
14 changes: 7 additions & 7 deletions inlong-dashboard/src/ui/locales/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,11 @@
"meta.Sinks.Pulsar.Tenant": "Pulsar 租户",
"meta.Sinks.Pulsar.Namespace": "命名空间",
"meta.Sinks.Pulsar.PartitionNum": "分区数",
"meta.Sinks.Cls.SaveTime": "日志保存时间",
"meta.Sinks.Cls.SaveTime.Week": "一周",
"meta.Sinks.Cls.SaveTime.Month": "一月",
"meta.Sinks.Cls.SaveTime.HalfAYear": "半年",
"meta.Sinks.Cls.SaveTime.OneYear": "一年",
"meta.Sinks.Cls.StorageDuration": "日志保存时间",
"meta.Sinks.Cls.StorageDuration.Week": "一周",
"meta.Sinks.Cls.StorageDuration.Month": "一月",
"meta.Sinks.Cls.StorageDuration.HalfAYear": "半年",
"meta.Sinks.Cls.StorageDuration.OneYear": "一年",
"meta.Sinks.Cls.Tag": "标签",
"meta.Sinks.Cls.Tokenizer": "分词规则",
"meta.Sinks.Cls.FieldName": "字段名",
Expand Down Expand Up @@ -455,8 +455,8 @@
"meta.Stream.ExecuteWorkflow": "执行工作流",
"meta.Stream.ExecuteConfirm": "确认执行工作流吗?",
"meta.Stream.ExecuteSuccess": "执行成功",
"meta.Stream.WrapWithInlongMsg": "InlongMsg 打包",
"meta.Stream.WrapWithInlongMsgHelp": "消息体使用 InlongMsg 打包",
"meta.Stream.WrapType": "消息打包格式",
"meta.Stream.WrapTypeHelp": "消息体打包类型,默认 InLongMsg V0。Raw:不对消息体进行任何协议打包,InLongMsg V0:六段式打包协议,InLongMsg V1:PB 打包协议",
"meta.Transform.Name": "转换名称",
"meta.Transform.NameRule": "只能包含英文字母、数字、点号(.)、中划线(-)、下划线(_)",
"meta.Transform.Type": "转换类型",
Expand Down
26 changes: 13 additions & 13 deletions inlong-dashboard/src/ui/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,11 @@
"meta.Sinks.Pulsar.Tenant": "Pulsar Tenant",
"meta.Sinks.Pulsar.Namespace": "Namespace",
"meta.Sinks.Pulsar.PartitionNum": "Partition Number",
"meta.Sinks.Cls.SaveTime": "Log save time",
"meta.Sinks.Cls.SaveTime.Week": "One week",
"meta.Sinks.Cls.SaveTime.Month": "One month",
"meta.Sinks.Cls.SaveTime.HalfAYear": "Half a year",
"meta.Sinks.Cls.SaveTime.OneYear": "One year",
"meta.Sinks.Cls.StorageDuration": "Log save time",
"meta.Sinks.Cls.StorageDuration.Week": "One week",
"meta.Sinks.Cls.StorageDuration.Month": "One month",
"meta.Sinks.Cls.StorageDuration.HalfAYear": "Half a year",
"meta.Sinks.Cls.StorageDuration.OneYear": "One year",
"meta.Sinks.Cls.Tag": "Tag",
"meta.Sinks.Cls.Tokenizer": "Tokenizer Rule",
"meta.Sinks.Cls.FieldName": "FieldName",
Expand Down Expand Up @@ -404,13 +404,13 @@
"meta.Group.Pulsar.TtlExtra": "The time-to-live time of the message, messages exceeding this value will be marked as ack (retained for up to 14 days)",
"meta.Group.Pulsar.RetentionSizeExtra": "Message capacity in ack state, messages exceeding this value will be deleted (-1 means never delete)",
"meta.Group.Pulsar.MaxMarkDeleteRateExtra": "Rate limit for mark delete operations",
"meta.Group.TubeMq.NumberOfAccess": "Number of Access",
"meta.Group.TubeMq.TenThousand/Day": "Ten Thousand / Day",
"meta.Group.TubeMq.AccessSize": "Access Size",
"meta.Group.TubeMq.NumberOfAccess": "Number of access",
"meta.Group.TubeMq.TenThousand/Day": "Ten thousand / Day",
"meta.Group.TubeMq.AccessSize": "Access size",
"meta.Group.TubeMq.GB/Day": "GB / Day",
"meta.Group.TubeMq.AccessPeakPerSecond": "PeakRecords",
"meta.Group.TubeMq.Stripe/Second": "Stripe / Second",
"meta.Group.TubeMq.SingleStripMaximumLength": "Single Max Length",
"meta.Group.TubeMq.AccessPeakPerSecond": "Peak records",
"meta.Group.TubeMq.Stripe/Second": "Records / 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",
Expand Down Expand Up @@ -455,8 +455,8 @@
"meta.Stream.ExecuteWorkflow": "ExecuteWorkflow",
"meta.Stream.ExecuteConfirm": "Are you sure to execute the workflow?",
"meta.Stream.ExecuteSuccess": "Execution Success",
"meta.Stream.WrapWithInlongMsg": "Wrap with InlongMsg",
"meta.Stream.WrapWithInlongMsgHelp": "The message body packaged with InlongMsg",
"meta.Stream.WrapType": "Message type",
"meta.Stream.WrapTypeHelp": "Message body packaging type, default InLongMsg V0. Raw: No protocol packaging of the message body, InLongMsg V0: Six-stage packaging protocol, InLongMsg V1: PB packaging protocol",
"meta.Transform.Name": "Transform name",
"meta.Transform.NameRule": "Only supports letters, numbers, dots(.), minus(-), and underscores(_)",
"meta.Transform.Type": "Transform Type",
Expand Down

0 comments on commit f12b833

Please sign in to comment.