Skip to content

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

refactor(frontend): improve instance creation form UX (#19595)

Vincent Huang1500f72fa665
diff --git a/frontend/src/components/InstanceForm/Buttons.vue b/frontend/src/components/InstanceForm/Buttons.vue
index 975a3e1532..da6c21c536 100644
--- a/frontend/src/components/InstanceForm/Buttons.vue
+++ b/frontend/src/components/InstanceForm/Buttons.vue
@@ -12,15 +12,6 @@
{{ $t("common.cancel") }}
</NButton>
<div class="flex items-center gap-x-2">
- <NButton
- tertiary
- type="primary"
- :loading="state.isTestingConnection"
- :disabled="!allowCreate || state.isRequesting || !allowEdit"
- @click.prevent="testConnectionForCurrentEditingDS"
- >
- {{ $t("instance.test-connection") }}
- </NButton>
<NButton
:disabled="
!allowCreate || state.isRequesting || state.isTestingConnection
@@ -228,6 +219,7 @@ const tryCreate = async () => {
if (testResult.success) {
doCreate();
} else {
+ maybeOpenConnectionOptions(editingDS);
const confirmed = await confirmContinueWithConnectionFailure(
testResult.message
);
@@ -287,6 +279,28 @@ const checkRODataSourceFeature = (instance: Instance) => {
return readonlyDataSourceList.value.every(checkOne);
};
+const hasConfiguredConnectionOptions = (ds: EditDataSource): boolean => {
+ const hasExtraParameters =
+ Object.keys(ds.extraConnectionParameters ?? {}).length > 0;
+ const hasSslConfig = !!(ds.useSsl || ds.sslCa || ds.sslCert || ds.sslKey);
+ const hasSshConfig = !!(
+ ds.sshHost ||
+ ds.sshPort ||
+ ds.sshUser ||
+ ds.sshPassword ||
+ ds.sshPrivateKey
+ );
+
+ return hasExtraParameters || hasSslConfig || hasSshConfig;
+};
+
+const maybeOpenConnectionOptions = (ds: EditDataSource) => {
+ if (!hasConfiguredConnectionOptions(ds)) {
+ return;
+ }
+ events.emit("show-connection-options");
+};
+
// We will also create the database * denoting all databases
// and its RW data source. The username, password is actually
// stored in that data source object instead of in the instance self.
@@ -434,6 +448,7 @@ const doUpdate = async () => {
}
const testResult = await testConnection(editState, /* silent */ true);
if (!testResult.success) {
+ maybeOpenConnectionOptions(editState);
const continueAnyway = await confirmContinueWithConnectionFailure(
testResult.message
);
@@ -479,6 +494,7 @@ const doUpdate = async () => {
if (editing.pendingCreate) {
const testResult = await testConnection(editing, /* silent */ true);
if (!testResult.success) {
+ maybeOpenConnectionOptions(editing);
const continueAnyway = await confirmContinueWithConnectionFailure(
testResult.message
);
@@ -548,10 +564,13 @@ const doUpdate = async () => {
}
};
-const testConnectionForCurrentEditingDS = () => {
+const testConnectionForCurrentEditingDS = async () => {
const editingDS = editingDataSource.value;
if (!editingDS) return;
- testConnection(editingDS, /* !silent */ false);
+ const testResult = await testConnection(editingDS, /* !silent */ false);
+ if (!testResult.success) {
+ maybeOpenConnectionOptions(editingDS);
+ }
};
const cancel = () => {
diff --git a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
index 98accea791..bc4f9f9387 100644
--- a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
+++ b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
@@ -205,8 +205,12 @@
"
class="sm:col-span-3 sm:col-start-1"
>
- <label for="username" class="textlabel block">
+ <label for="username" class="textlabel flex items-center gap-x-1">
{{ $t("common.username") }}
+ <InfoTrigger
+ v-if="isCreating && infoPanel && hasAuthenticationInfo"
+ @click="openInfoPanel('authentication')"
+ />
</label>
<!-- For mysql, username can be empty indicating anonymous user.
But it's a very bad practice to use anonymous user for admin operation,
@@ -941,152 +945,157 @@ MIIEvQ...
</template>
<template v-if="!hideOptions">
- <div v-if="hasExtraParameters" class="sm:col-span-3 sm:col-start-1">
- <div class="flex flex-row items-center justify-between">
- <label class="textlabel block">
- {{ $t("data-source.extra-params.self") }}
- </label>
- </div>
- <div class="textinfolabel text-sm mt-1 mb-2">
- {{ $t("data-source.extra-params.description") }}
- </div>
-
- <!-- Add parameter form -->
<div
- v-if="allowEdit"
- class="flex mt-2 mb-2 gap-x-2 bg-gray-50 p-3 rounded-md"
+ v-if="
+ showSSL &&
+ dataSource.authenticationType ===
+ DataSource_AuthenticationType.PASSWORD
+ "
+ class="sm:col-span-3 sm:col-start-1"
>
- <NInput
- v-model:value="newParam.key"
- class="w-full"
- :placeholder="$t('instance.parameter-name-placeholder')"
- />
- <NInput
- v-model:value="newParam.value"
- class="w-full"
- :placeholder="$t('instance.parameter-value-placeholder')"
- />
- <NButton
- type="primary"
- ghost
- size="small"
- :disabled="!newParam.key.trim()"
- @click="addNewParameter"
+ <div
+ for="ssl"
+ class="flex items-center justify-start gap-x-2 textlabel"
>
- Add
- </NButton>
+ {{ $t("data-source.ssl-connection") }}
+ <Switch
+ :text="true"
+ :value="dataSource.useSsl"
+ @update:value="handleUseSslChanged"
+ />
+ <InfoTrigger
+ v-if="isCreating && infoPanel && hasSslInfo"
+ @click="openInfoPanel('ssl')"
+ />
+ </div>
+ <template v-if="dataSource.useSsl">
+ <SslCertificateFormV1
+ v-if="dataSource.pendingCreate || dataSource.updateSsl"
+ class="pt-1!"
+ v-model:verify="dataSource.verifyTlsCertificate"
+ v-model:ca="dataSource.sslCa"
+ v-model:cert="dataSource.sslCert"
+ v-model:private-key="dataSource.sslKey"
+ :engine-type="basicInfo.engine"
+ :disabled="!allowEdit"
+ />
+ <NButton
+ v-else
+ class="mt-2!"
+ :disabled="!allowEdit"
+ @click.prevent="handleEditSSL"
+ >
+ {{ $t("common.edit") }} - {{ $t("common.write-only") }}
+ </NButton>
+ </template>
</div>
- <!-- Existing parameters -->
<div
- v-for="(param, index) in extraConnectionParamsList"
- :key="param.key"
- class="flex mt-2 gap-x-2"
+ v-if="
+ !hideAdvancedFeatures &&
+ showSSH &&
+ dataSource.authenticationType ===
+ DataSource_AuthenticationType.PASSWORD
+ "
+ class="sm:col-span-3 sm:col-start-1"
>
- <NInput
- class="w-full"
- :value="param.key"
- :disabled="!allowEdit"
- placeholder="Parameter name"
- @update:value="(v) => updateExtraConnectionParamKey(index, v)"
- />
- <NInput
- class="w-full"
- :value="param.value"
+ <div class="flex flex-row items-center gap-x-1">
+ <label for="ssh" class="textlabel block">
+ {{ $t("data-source.ssh-connection") }}
+ </label>
+ <InfoTrigger
+ v-if="isCreating && infoPanel && hasSshInfo"
+ @click="openInfoPanel('ssh')"
+ />
+ </div>
+ <SshConnectionForm
+ :value="dataSource"
+ :instance="instance"
:disabled="!allowEdit"
- placeholder="Parameter value"
- @update:value="(v) => updateExtraConnectionParamValue(index, v)"
+ @change="handleSSHChange"
/>
- <NButton
- v-if="allowEdit"
- type="error"
- secondary
- size="small"
- @click="removeExtraConnectionParam(index)"
- title="Remove parameter"
- >
- Remove
- </NButton>
</div>
- <!-- Show a message when there are no parameters -->
- <div
- v-if="extraConnectionParamsList.length === 0"
- class="textinfolabel text-sm italic"
- >
- {{
- allowEdit
- ? $t("instance.no-params-yet-add-above")
- : $t("instance.no-extra-params-configured")
- }}
- </div>
- </div>
+ <div v-if="hasExtraParameters" class="sm:col-span-3 sm:col-start-1">
+ <div class="flex flex-row items-center justify-between">
+ <label class="textlabel block">
+ {{ $t("data-source.extra-params.self") }}
+ </label>
+ </div>
+ <div class="textinfolabel text-sm mt-1 mb-2">
+ {{ $t("data-source.extra-params.description") }}
+ </div>
- <div
- v-if="
- showSSL &&
- dataSource.authenticationType === DataSource_AuthenticationType.PASSWORD
- "
- class="sm:col-span-3 sm:col-start-1"
- >
- <div for="ssl" class="flex items-center justify-start gap-x-2 textlabel">
- {{ $t("data-source.ssl-connection") }}
- <Switch
- :text="true"
- :value="dataSource.useSsl"
- @update:value="handleUseSslChanged"
- />
- <InfoTrigger
- v-if="isCreating && infoPanel"
- @click="openInfoPanel('ssl')"
- />
- </div>
- <template v-if="dataSource.useSsl">
- <SslCertificateFormV1
- v-if="dataSource.pendingCreate || dataSource.updateSsl"
- class="pt-1!"
- v-model:verify="dataSource.verifyTlsCertificate"
- v-model:ca="dataSource.sslCa"
- v-model:cert="dataSource.sslCert"
- v-model:private-key="dataSource.sslKey"
- :engine-type="basicInfo.engine"
- :disabled="!allowEdit"
- />
- <NButton
- v-else
- class="mt-2!"
- :disabled="!allowEdit"
- @click.prevent="handleEditSSL"
+ <!-- Add parameter form -->
+ <div
+ v-if="allowEdit"
+ class="flex mt-2 mb-2 gap-x-2 bg-gray-50 p-3 rounded-md"
>
- {{ $t("common.edit") }} - {{ $t("common.write-only") }}
- </NButton>
- </template>
- </div>
+ <NInput
+ v-model:value="newParam.key"
+ class="w-full"
+ :placeholder="$t('instance.parameter-name-placeholder')"
+ />
+ <NInput
+ v-model:value="newParam.value"
+ class="w-full"
+ :placeholder="$t('instance.parameter-value-placeholder')"
+ />
+ <NButton
+ type="primary"
+ ghost
+ size="small"
+ :disabled="!newParam.key.trim()"
+ @click="addNewParameter"
+ >
+ Add
+ </NButton>
+ </div>
- <div
- v-if="
- !hideAdvancedFeatures &&
- showSSH &&
- dataSource.authenticationType === DataSource_AuthenticationType.PASSWORD
- "
- class="sm:col-span-3 sm:col-start-1"
- >
- <div class="flex flex-row items-center gap-x-1">
- <label for="ssh" class="textlabel block">
- {{ $t("data-source.ssh-connection") }}
- </label>
- <InfoTrigger
- v-if="isCreating && infoPanel"
- @click="openInfoPanel('ssh')"
- />
+ <!-- Existing parameters -->
+ <div
+ v-for="(param, index) in extraConnectionParamsList"
+ :key="param.key"
+ class="flex mt-2 gap-x-2"
+ >
+ <NInput
+ class="w-full"
+ :value="param.key"
+ :disabled="!allowEdit"
+ placeholder="Parameter name"
+ @update:value="(v) => updateExtraConnectionParamKey(index, v)"
+ />
+ <NInput
+ class="w-full"
+ :value="param.value"
+ :disabled="!allowEdit"
+ placeholder="Parameter value"
+ @update:value="(v) => updateExtraConnectionParamValue(index, v)"
+ />
+ <NButton
+ v-if="allowEdit"
+ type="error"
+ secondary
+ size="small"
+ @click="removeExtraConnectionParam(index)"
+ title="Remove parameter"
+ >
+ Remove
+ </NButton>
+ </div>
+
+ <!-- Show a message when there are no parameters -->
+ <div
+ v-if="extraConnectionParamsList.length === 0"
+ class="textinfolabel text-sm italic"
+ >
+ {{
+ allowEdit
+ ? $t("instance.no-params-yet-add-above")
+ : $t("instance.no-extra-params-configured")
+ }}
+ </div>
</div>
- <SshConnectionForm
- :value="dataSource"
- :instance="instance"
- :disabled="!allowEdit"
- @change="handleSSHChange"
- />
- </div>
</template>
</div>
</template>
@@ -1130,7 +1139,7 @@ import { onlyAllowNumber } from "@/utils";
import type { EditDataSource } from "../common";
import { useInstanceFormContext } from "../context";
import InfoTrigger from "../InfoTrigger.vue";
-import type { InfoSection } from "../info-content";
+import { hasInfoContent, type InfoSection } from "../info-content";
import CreateDataSourceExample from "./CreateDataSourceExample.vue";
import CredentialSourceForm from "./CredentialSourceForm.vue";
import OracleSIDAndServiceNameInput from "./OracleSIDAndServiceNameInput.vue";
@@ -1180,9 +1189,22 @@ const infoPanel = inject<
>("infoPanel", undefined);
const openInfoPanel = (section: InfoSection) => {
+ if (!hasInfoContent(basicInfo.value.engine, section)) {
+ return;
+ }
infoPanel?.open(section);
};
+const hasAuthenticationInfo = computed(() =>
+ hasInfoContent(basicInfo.value.engine, "authentication")
+);
+const hasSslInfo = computed(() =>
+ hasInfoContent(basicInfo.value.engine, "ssl")
+);
+const hasSshInfo = computed(() =>
+ hasInfoContent(basicInfo.value.engine, "ssh")
+);
+
const {
showDatabase,
showSSL,
diff --git a/frontend/src/components/InstanceForm/Form.vue b/frontend/src/components/InstanceForm/Form.vue
index 90025c7adc..c2236eebec 100644
--- a/frontend/src/components/InstanceForm/Form.vue
+++ b/frontend/src/components/InstanceForm/Form.vue
@@ -31,8 +31,7 @@
</NTag>
</div>
</div>
- <div class="shrink-0 flex items-center gap-x-2 text-control-light">
- <span class="text-sm">{{ $t("common.edit") }}</span>
+ <div class="shrink-0 text-control-light">
<ChevronDownIcon
v-if="!isEngineSelectorCollapsed"
class="w-4 h-4"
@@ -75,7 +74,7 @@
{{ $t("instance.section.basic-info") }}
</h3>
- <div class="grid grid-cols-1 gap-y-6 gap-x-4 sm:grid-cols-4">
+ <div class="mt-3 grid grid-cols-1 gap-y-6 gap-x-4 sm:grid-cols-4">
<div class="sm:col-span-2 sm:col-start-1">
<label for="name" class="textlabel flex flex-row items-center">
{{ $t("instance.instance-name") }}
@@ -238,15 +237,11 @@
<!-- Connection Card -->
<div class="border border-block-border rounded-lg p-5">
- <h3 class="text-base font-medium text-main flex items-center gap-x-1">
+ <h3 class="text-base font-medium text-main">
{{ $t("instance.section.connection") }}
- <InfoTrigger
- v-if="isCreating && infoPanel"
- @click="openInfoPanel('authentication')"
- />
</h3>
- <div class="grid grid-cols-1 gap-y-6 gap-x-4 sm:grid-cols-4">
+ <div class="mt-3 grid grid-cols-1 gap-y-6 gap-x-4 sm:grid-cols-4">
<div class="sm:col-span-3 sm:col-start-1">
<template v-if="basicInfo.engine === Engine.SPANNER">
<SpannerHostInput
@@ -300,7 +295,7 @@
{{ $t("instance.host-or-socket") }}
<RequiredStar v-if="basicInfo.engine !== Engine.DYNAMODB" />
<InfoTrigger
- v-if="isCreating && infoPanel"
+ v-if="isCreating && infoPanel && hasHostInfo"
@click="openInfoPanel('host')"
/>
</template>
@@ -532,12 +527,50 @@
<!-- Connection Options Card (Extra Params, SSL, SSH) -->
<div
v-if="basicInfo.engine !== Engine.DYNAMODB && editingDataSource"
- class="border border-block-border rounded-lg p-5"
+ class="border border-block-border rounded-lg bg-white"
>
- <h3 class="text-base font-medium text-main">
- {{ $t("instance.connection-options") }}
- </h3>
- <DataSourceForm :data-source="editingDataSource" options-only />
+ <button
+ type="button"
+ class="w-full flex items-center justify-between gap-x-3 px-5 py-4 text-left transition-colors hover:bg-gray-50"
+ @click="toggleConnectionOptions"
+ >
+ <h3 class="text-base font-medium text-main">
+ {{ $t("instance.connection-options") }}
+ </h3>
+ <div class="shrink-0 text-control-light">
+ <ChevronDownIcon
+ v-if="!isConnectionOptionsCollapsed"
+ class="w-4 h-4"
+ />
+ <ChevronRightIcon v-else class="w-4 h-4" />
+ </div>
+ </button>
+ <Transition name="connection-options">
+ <div
+ v-show="!isConnectionOptionsCollapsed"
+ class="border-t border-block-border px-5 py-4"
+ >
+ <DataSourceForm :data-source="editingDataSource" options-only />
+ </div>
+ </Transition>
+ </div>
+
+ <div
+ v-if="
+ isCreating &&
+ !!editingDataSource
+ "
+ class="flex justify-start"
+ >
+ <NButton
+ tertiary
+ type="primary"
+ :loading="state.isTestingConnection"
+ :disabled="!allowTestConnection"
+ @click.prevent="testConnectionForCurrentEditingDS"
+ >
+ {{ $t("instance.test-connection") }}
+ </NButton>
</div>
<!-- Sync Databases Card (create only) -->
@@ -550,6 +583,7 @@
</p>
<SyncDatabases
+ class="mt-2"
:is-creating="true"
:show-label="false"
:allow-edit="allowEdit && !!allowCreate"
@@ -587,6 +621,7 @@ import {
RichEngineName,
} from "@/components/v2";
import ResourceIdField from "@/components/v2/Form/ResourceIdField.vue";
+import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";
import {
pushNotification,
useActuatorV1Store,
@@ -610,6 +645,7 @@ import {
autoSubscriptionRoute,
extractInstanceResourceName,
isDev,
+ isValidSpannerHost,
onlyAllowNumber,
supportedEngineV1List,
urlfy,
@@ -625,13 +661,15 @@ import { useInstanceFormContext } from "./context";
import DataSourceForm from "./DataSourceSection/DataSourceForm.vue";
import DataSourceSection from "./DataSourceSection/DataSourceSection.vue";
import InfoTrigger from "./InfoTrigger.vue";
-import type { InfoSection } from "./info-content";
+import { hasInfoContent, type InfoSection } from "./info-content";
import ScanIntervalInput from "./ScanIntervalInput.vue";
import SpannerHostInput from "./SpannerHostInput.vue";
import SyncDatabases from "./SyncDatabases.vue";
const context = useInstanceFormContext();
const {
+ events,
+ state,
specs,
instance,
environment,
@@ -644,6 +682,8 @@ const {
labelKVList,
adminDataSource,
editingDataSource,
+ checkDataSource,
+ testConnection,
} = context;
const { isEngineBeta, defaultPort, instanceLink, allowEditPort } = specs;
@@ -665,15 +705,82 @@ watch(
);
const openInfoPanel = (section: InfoSection) => {
+ if (!hasInfoContent(basicInfo.value.engine, section)) {
+ return;
+ }
infoPanel?.open(section);
};
+const hasHostInfo = computed(() =>
+ hasInfoContent(basicInfo.value.engine, "host")
+);
+
const { t } = useI18n();
const instanceV1Store = useInstanceV1Store();
const actuatorStore = useActuatorV1Store();
const subscriptionStore = useSubscriptionV1Store();
const scanIntervalInputRef = ref<InstanceType<typeof ScanIntervalInput>>();
const isEngineSelectorCollapsed = ref(false);
+const isConnectionOptionsCollapsed = ref(true);
+
+const showConnectionOptionsCard = computed(() => {
+ return (
+ basicInfo.value.engine !== Engine.DYNAMODB && !!editingDataSource.value
+ );
+});
+
+const hasConfiguredConnectionOptions = computed(() => {
+ const ds = editingDataSource.value;
+ if (!ds) {
+ return false;
+ }
+
+ const hasExtraParameters =
+ Object.keys(ds.extraConnectionParameters ?? {}).length > 0;
+ const hasSslConfig = !!(ds.useSsl || ds.sslCa || ds.sslCert || ds.sslKey);
+ const hasSshConfig = !!(
+ ds.sshHost ||
+ ds.sshPort ||
+ ds.sshUser ||
+ ds.sshPassword ||
+ ds.sshPrivateKey
+ );
+
+ return hasExtraParameters || hasSslConfig || hasSshConfig;
+});
+
+watch(
+ () => ({
+ show: showConnectionOptionsCard.value,
+ creating: isCreating.value,
+ hasConfigured: hasConfiguredConnectionOptions.value,
+ }),
+ (next, prev) => {
+ if (!next.show) {
+ return;
+ }
+
+ const becameVisible = !prev?.show;
+ if (becameVisible) {
+ isConnectionOptionsCollapsed.value = next.creating
+ ? true
+ : !next.hasConfigured;
+ return;
+ }
+
+ if (!next.creating && next.hasConfigured && !prev?.hasConfigured) {
+ isConnectionOptionsCollapsed.value = false;
+ }
+ },
+ { immediate: true }
+);
+
+useEmitteryEventListener(events, "show-connection-options", () => {
+ if (!showConnectionOptionsCard.value) {
+ return;
+ }
+ isConnectionOptionsCollapsed.value = false;
+});
const availableLicenseCount = computed(() => {
return Math.max(
@@ -791,6 +898,49 @@ const toggleEngineSelector = () => {
isEngineSelectorCollapsed.value = !isEngineSelectorCollapsed.value;
};
+const toggleConnectionOptions = () => {
+ isConnectionOptionsCollapsed.value = !isConnectionOptionsCollapsed.value;
+};
+
+const allowTestConnection = computed(() => {
+ if (
+ !allowEdit.value ||
+ state.value.isRequesting ||
+ state.value.isTestingConnection
+ ) {
+ return false;
+ }
+
+ const ds = editingDataSource.value;
+ if (!ds) {
+ return false;
+ }
+
+ if (basicInfo.value.engine === Engine.SPANNER) {
+ return isValidSpannerHost(ds.host);
+ }
+ if (basicInfo.value.engine === Engine.BIGQUERY) {
+ return ds.host !== "";
+ }
+ if (basicInfo.value.engine !== Engine.DYNAMODB && ds.host === "") {
+ return false;
+ }
+
+ return checkDataSource([ds]);
+});
+
+const testConnectionForCurrentEditingDS = async () => {
+ const ds = editingDataSource.value;
+ if (!ds) {
+ return;
+ }
+
+ const result = await testConnection(ds, /* !silent */ false);
+ if (!result.success && hasConfiguredConnectionOptions.value) {
+ events.emit("show-connection-options");
+ }
+};
+
const handleChangeSyncDatabases = (databases: string[]) => {
basicInfo.value.syncDatabases = [...databases];
};
@@ -904,4 +1054,24 @@ const handleSelectEnvironment = (name: string | undefined) => {
opacity: 1;
transform: translateY(0);
}
+
+.connection-options-enter-active,
+.connection-options-leave-active {
+ overflow: hidden;
+ transition: max-height 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
+}
+
+.connection-options-enter-from,
+.connection-options-leave-to {
+ max-height: 0;
+ opacity: 0;
+ transform: translateY(-0.25rem);
+}
+
+.connection-options-enter-to,
+.connection-options-leave-from {
+ max-height: 80rem;
+ opacity: 1;
+ transform: translateY(0);
+}
</style>
diff --git a/frontend/src/components/InstanceForm/InfoPanel.vue b/frontend/src/components/InstanceForm/InfoPanel.vue
index 55ebd36986..63b736d442 100644
--- a/frontend/src/components/InstanceForm/InfoPanel.vue
+++ b/frontend/src/components/InstanceForm/InfoPanel.vue
@@ -7,7 +7,7 @@
@click.self="$emit('close')"
>
<div
- class="w-80 bg-white border-l border-block-border shadow-lg flex flex-col h-full"
+ class="w-[500px] bg-white border-l border-block-border shadow-lg flex flex-col h-full"
>
<div
class="sticky top-0 z-10 flex items-center justify-between px-4 py-3 border-b border-block-border bg-white"
diff --git a/frontend/src/components/InstanceForm/InfoPanelContent.vue b/frontend/src/components/InstanceForm/InfoPanelContent.vue
index f57a828ac4..6607e00b70 100644
--- a/frontend/src/components/InstanceForm/InfoPanelContent.vue
+++ b/frontend/src/components/InstanceForm/InfoPanelContent.vue
@@ -6,10 +6,11 @@
<div v-if="snippet.codeBlock" class="flex flex-col gap-y-1">
<div class="flex flex-row">
<NConfigProvider
- class="flex-1 min-w-0 w-full inline-flex items-center px-3 py-2 border border-control-border bg-gray-50 text-xs whitespace-pre-line rounded-l-[3px] overflow-x-auto"
+ class="flex-1 min-w-0 w-full inline-flex items-center px-3 py-2 border border-control-border bg-gray-50 whitespace-pre-line rounded-l-[3px] overflow-x-auto"
:hljs="hljs"
>
<NCode
+ class="text-[12px]"
word-wrap
:language="snippet.codeBlock.language"
:code="snippet.codeBlock.code"
diff --git a/frontend/src/components/InstanceForm/context.ts b/frontend/src/components/InstanceForm/context.ts
index cf90db0791..6a6e8025cb 100644
--- a/frontend/src/components/InstanceForm/context.ts
+++ b/frontend/src/components/InstanceForm/context.ts
@@ -61,6 +61,7 @@ export const provideInstanceFormContext = (baseContext: {
const { t } = useI18n();
const events = new Emittery<{
dismiss: undefined;
+ "show-connection-options": undefined;
}>();
const { instance } = baseContext;
const state = ref<LocalState>({
diff --git a/frontend/src/components/InstanceForm/info-content.ts b/frontend/src/components/InstanceForm/info-content.ts
index 8cfc263ace..22104bf4c1 100644
--- a/frontend/src/components/InstanceForm/info-content.ts
+++ b/frontend/src/components/InstanceForm/info-content.ts
@@ -207,3 +207,6 @@ export const getInfoContent = (
): InfoSnippet | undefined => {
return engineContentMap[engine]?.[section];
};
+
+export const hasInfoContent = (engine: Engine, section: InfoSection): boolean =>
+ !!getInfoContent(engine, section);
diff --git a/frontend/src/views/CreateInstancePage.vue b/frontend/src/views/CreateInstancePage.vue
index 6a300be4fa..8d5ee7e44c 100644
--- a/frontend/src/views/CreateInstancePage.vue
+++ b/frontend/src/views/CreateInstancePage.vue
@@ -87,7 +87,7 @@ const subscriptionStore = useSubscriptionV1Store();
const actuatorStore = useActuatorV1Store();
const MIN_DOCKED_MAIN_WIDTH = 700;
-const DOCKED_INFO_RAIL_WIDTH = 320;
+const DOCKED_INFO_RAIL_WIDTH = 500;
const DOCKED_INFO_RAIL_GAP = 16;
const MIN_DOCKED_LAYOUT_WIDTH =
MIN_DOCKED_MAIN_WIDTH + DOCKED_INFO_RAIL_WIDTH + DOCKED_INFO_RAIL_GAP;