Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix(frontend): correct cloud connection notice spacing (#21423)

p0ny730b0f6a0e4e
diff --git a/frontend/src/components/instance/InstanceFormBody.test.ts b/frontend/src/components/instance/InstanceFormBody.test.ts
index b4012d05ab..ff83155ff7 100644
--- a/frontend/src/components/instance/InstanceFormBody.test.ts
+++ b/frontend/src/components/instance/InstanceFormBody.test.ts
@@ -184,12 +184,18 @@ describe("InstanceFormBody", () => {
'className="flex flex-col gap-4"',
connectionTitleIndex
);
+ const authenticationIndex = source.indexOf(
+ "<DataSourceForm",
+ connectionTitleIndex
+ );
expect(connectionTitleIndex).toBeGreaterThanOrEqual(0);
expect(firewallAlertIndex).toBeGreaterThan(connectionTitleIndex);
expect(firewallAlertIndex).toBeLessThan(firewallInfoIndex);
expect(firewallInfoIndex).toBeGreaterThan(connectionTitleIndex);
- expect(firewallInfoIndex).toBeLessThan(connectionGridIndex);
+ expect(connectionGridIndex).toBeGreaterThan(connectionTitleIndex);
+ expect(firewallAlertIndex).toBeGreaterThan(connectionGridIndex);
+ expect(firewallInfoIndex).toBeLessThan(authenticationIndex);
expect(source).toContain(
'href="https://docs.bytebase.com/get-started/cloud#prerequisites"'
);
diff --git a/frontend/src/components/instance/InstanceFormBody.tsx b/frontend/src/components/instance/InstanceFormBody.tsx
index 34ab426364..f04fe47c63 100644
--- a/frontend/src/components/instance/InstanceFormBody.tsx
+++ b/frontend/src/components/instance/InstanceFormBody.tsx
@@ -1450,20 +1450,19 @@ export function InstanceFormBody({ onOpenInfoPanel }: InstanceFormBodyProps) {
{/* Connection Card */}
<FormSection layout="stacked" title={t("instance.section.connection")}>
- {isSaaSMode && (
- <Alert variant="info" className="mt-2">
- <a
- href="https://docs.bytebase.com/get-started/cloud#prerequisites"
- target="_blank"
- rel="noopener noreferrer"
- className="normal-link"
- >
- {t("instance.sentence.firewall-info")}
- </a>
- </Alert>
- )}
-
<div className="flex flex-col gap-4">
+ {isSaaSMode && (
+ <Alert variant="info">
+ <a
+ href="https://docs.bytebase.com/get-started/cloud#prerequisites"
+ target="_blank"
+ rel="noopener noreferrer"
+ className="normal-link"
+ >
+ {t("instance.sentence.firewall-info")}
+ </a>
+ </Alert>
+ )}
{editingDataSource?.id === adminDataSource.id && (
<DataSourceForm
authOnly