Skip to content

Commit fc33bcb

Browse files
authored
ClickHouse Cloud Port Selector (#8458)
* only defaults SSL, Port is now selecatable dropdown bettwen 8443 and 9440 * update ui to match other inputs' hints checked measure dimension drodpown which is using select and no discernable differences * revert select * setfontsize in the clickhousefform for consistnecy * removefontSize * return optional * revert fontSize
1 parent a9674b0 commit fc33bcb

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

runtime/drivers/clickhouse/clickhouse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ var spec = drivers.Spec{
8585
DisplayName: "Port",
8686
Description: "Port number of the ClickHouse server",
8787
Placeholder: "9000",
88-
Hint: "Default port is 9000 for native protocol. Also commonly used: 8443 for ClickHouse Cloud (HTTPS), 8123 for HTTP",
88+
Hint: "Default ClickHouse ports: 9000 (native TCP), 8123 (HTTP). Secure/common alternatives: 9440 (native TCP + TLS) and 8443 (HTTPS, often used in ClickHouse Cloud/managed setups).",
8989
Default: "9000",
9090
},
9191
{

web-common/src/features/sources/modal/AddClickHouseForm.svelte

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@
244244
connectionTab === "parameters"
245245
) {
246246
(values as any).ssl = true;
247-
(values as any).port = "8443";
248247
}
249248
250249
try {
@@ -400,14 +399,19 @@
400399
id={propertyKey}
401400
label={property.displayName}
402401
placeholder={property.placeholder}
403-
optional={!property.required}
402+
optional={property.required}
404403
secret={property.secret}
405404
hint={property.hint}
406405
errors={normalizeErrors($paramsErrors[propertyKey])}
407406
bind:value={$paramsForm[propertyKey]}
408407
onInput={(_, e) => onStringInputChange(e)}
409408
alwaysShowError
410-
disabled={connectorType === "clickhouse-cloud" && isPortField}
409+
options={connectorType === "clickhouse-cloud" && isPortField
410+
? [
411+
{ value: "8443", label: "8443 (HTTPS)" },
412+
{ value: "9440", label: "9440 (Native Secure)" },
413+
]
414+
: undefined}
411415
/>
412416
{:else if property.type === ConnectorDriverPropertyType.TYPE_BOOLEAN}
413417
<Checkbox

web-common/src/features/sources/modal/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function hasOnlyDsn(
8585

8686
/**
8787
* Applies ClickHouse Cloud-specific default requirements for connector values.
88-
* - For ClickHouse Cloud: enforces `ssl: true` and `port: "8443"`
88+
* - For ClickHouse Cloud: enforces `ssl: true`
8989
* - Otherwise returns values unchanged
9090
*/
9191
export function applyClickHouseCloudRequirements(
@@ -94,7 +94,7 @@ export function applyClickHouseCloudRequirements(
9494
values: Record<string, unknown>,
9595
): Record<string, unknown> {
9696
if (connectorName === "clickhouse" && connectorType === "clickhouse-cloud") {
97-
return { ...values, ssl: true, port: "8443" } as Record<string, unknown>;
97+
return { ...values, ssl: true } as Record<string, unknown>;
9898
}
9999
return values;
100100
}

0 commit comments

Comments
 (0)