Skip to content

Commit 3166490

Browse files
committed
refactor(Drawer.vue): update database type handling in connection options and dropdown to improve data consistency
1 parent 9bc9215 commit 3166490

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/business/src/views/data-server/Drawer.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ const getDatabaseTypes = async () => {
224224
data.map((it: any) => {
225225
return {
226226
name: it.name,
227+
type: it.type,
227228
pdkHash: it.pdkHash,
228229
}
229230
}) || []
@@ -243,7 +244,7 @@ const getConnectionOptions = async (filter: any) => {
243244
database_type: form.value.connectionType
244245
? form.value.connectionType
245246
: {
246-
in: AllowedTypes,
247+
in: databaseTypes.value?.map((t: any) => t.type),
247248
},
248249
connection_type:
249250
import.meta.env.VUE_APP_MODE !== 'msa'
@@ -1102,7 +1103,7 @@ provide('form', form)
11021103
<ElOption
11031104
v-for="item in databaseTypes"
11041105
:key="item"
1105-
:value="item.name"
1106+
:value="item.type"
11061107
:label="item.name"
11071108
>
11081109
<div class="flex align-items-center gap-2">

0 commit comments

Comments
 (0)