feat(jdbc): add dedicated connection entry

This commit is contained in:
zipg authored and GitHub committed 2026-07-14 18:03:36 +08:00
1 parent 358a736c6e
commit 0bbaf33d92
12 files changed
+76 -11

No files matched your search

@@ -28,17 +28,23 @@ const isWeb = !isTauriRuntime();
const props = withDefaults(
defineProps<{
updateNotificationsEnabled?: boolean;
activeTab?: "agent" | "jdbc" | "storage" | "runtime";
}>(),
{
updateNotificationsEnabled: true,
activeTab: "agent",
},
);
const emit = defineEmits<{
"update-count-change": [count: number];
"update:activeTab": [tab: "agent" | "jdbc" | "storage" | "runtime"];
}>();
const driverStoreTab = ref("agent");
const driverStoreTab = computed({
get: () => props.activeTab,
set: (tab: "agent" | "jdbc" | "storage" | "runtime") => emit("update:activeTab", tab),
});
// ──────────── Driver store path ────────────
@@ -117,7 +117,7 @@ const emit = defineEmits<{
connectStarted: [name: string];
connectSucceeded: [name: string];
connectFailed: [message: string];
openDriverStore: [];
openDriverStore: [tab?: "jdbc"];
openTunnelProfileSettings: [];
}>();
@@ -1820,7 +1820,6 @@ const dbOptions: DbOption[] = [
{ value: "nacos", label: "Nacos" },
{ value: "influxdb", label: "InfluxDB" },
{ value: "iris", label: "IRIS" },
{ value: "jdbc", label: "JDBC" },
{ value: "manticoresearch", label: "Manticore Search" },
{ value: "custom_mysql", label: "Custom (MySQL)" },
{ value: "custom_postgres", label: "Custom (PostgreSQL)" },
@@ -3833,7 +3832,7 @@ function openExternalUrl(url: string) {
<template v-if="dialogStep === 'select'">
<div class="space-y-4">
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-end">
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
<div class="flex items-center gap-2">
<div class="flex shrink-0 rounded-lg border bg-muted/40 p-0.5">
<Button type="button" size="icon-sm" :variant="dbPickerView === 'icon' ? 'secondary' : 'ghost'" :title="t('connection.iconView')" :aria-label="t('connection.iconView')" @click="dbPickerView = 'icon'">
@@ -3848,6 +3847,10 @@ function openExternalUrl(url: string) {
<Input v-model="dbSearchQuery" class="h-9 pl-8" :placeholder="t('connection.searchDatabasePlaceholder')" />
</div>
</div>
<Button data-jdbc-connection-entry type="button" variant="outline" class="h-9 shrink-0 gap-2" @click="goToConnectionStep('jdbc')">
<DatabaseIcon db-type="jdbc" class="h-4 w-4" />
{{ t("connection.jdbcConnection") }}
</Button>
</div>
<div class="max-h-[58vh] space-y-5 overflow-y-auto pr-2">
@@ -4132,7 +4135,7 @@ function openExternalUrl(url: string) {
{{ t("connection.jdbcPluginHint") }}
</p>
<div class="flex flex-wrap gap-2">
<Button type="button" variant="outline" size="sm" @click="emit('openDriverStore')">
<Button type="button" variant="outline" size="sm" @click="emit('openDriverStore', 'jdbc')">
<FolderOpen class="h-3.5 w-3.5" />
{{ t("toolbar.driverManager") }}
</Button>
@@ -5057,7 +5060,7 @@ function openExternalUrl(url: string) {
{{ t("connection.jdbcPluginHint") }}
</p>
<div class="flex flex-wrap gap-2">
<Button type="button" variant="outline" size="sm" @click="emit('openDriverStore')">
<Button type="button" variant="outline" size="sm" @click="emit('openDriverStore', 'jdbc')">
<FolderOpen class="h-3.5 w-3.5" />
{{ t("toolbar.driverManager") }}
</Button>
@@ -49,7 +49,7 @@ const emit = defineEmits<{
connectStarted: [name: string];
connectSucceeded: [name: string];
connectFailed: [message: string];
openDriverStore: [];
openDriverStore: [tab?: "jdbc"];
openTunnelProfileSettings: [];
openLineageTarget: [
target: {
@@ -136,7 +136,7 @@ watch(
@connect-started="emit('connectStarted', $event)"
@connect-succeeded="emit('connectSucceeded', $event)"
@connect-failed="emit('connectFailed', $event)"
@open-driver-store="emit('openDriverStore')"
@open-driver-store="emit('openDriverStore', $event)"
@open-tunnel-profile-settings="emit('openTunnelProfileSettings')"
/>
<DangerConfirmDialog