Skip to content

Commit

Permalink
fix(action): set the default value of batch_size and hide it
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinplemelon authored and ysfscream committed May 24, 2024
1 parent 0774aa0 commit 773a92a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/hooks/Rule/bridge/useComponentsHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,10 @@ export default (
components.parameters = { ...omit(components.parameters, ['type', 'oneOf']), ...directItem }
Object.assign(rules, directItem.rules)
}
const batchSize = components?.resource_opts?.properties?.batch_size
if (batchSize && batchSize.default > 1) {
batchSize.default = 1
}
if (components?.parameters?.properties?.content?.type === 'string') {
components.parameters.properties.content.format = 'sql'
}
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/Rule/bridge/useSchemaBridgePropsLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export default (
[BridgeType.AzureEventHubs]: kafkaProducerColClassMap,
[BridgeType.Confluent]: kafkaProducerColClassMap,
[BridgeType.Elasticsearch]: { 'parameters.action': 'col-hidden' },
[BridgeType.S3]: { 'parameters.mode': 'col-hidden' },
[BridgeType.S3]: { 'parameters.mode': 'col-hidden', 'resource_opts.batch_size': 'col-hidden' },
}

const advancedFieldsMap: Record<string, Array<string>> = {
Expand Down

0 comments on commit 773a92a

Please sign in to comment.