Skip to content

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

Dedupe the database convert code

天舟f3befd7c3e76
diff --git a/frontend/src/store/modules/database.ts b/frontend/src/store/modules/database.ts
index d92e98cbb1..6b1f76cc06 100644
--- a/frontend/src/store/modules/database.ts
+++ b/frontend/src/store/modules/database.ts
@@ -85,14 +85,8 @@ function convert(
}
return {
- id: database.id,
- instance,
- project,
+ ...(databaseWithoutDataSourceList as Omit<Database, "dataSourceList">),
dataSourceList,
- ...(database.attributes as Omit<
- Database,
- "id" | "instance" | "project" | "dataSourceList"
- >),
};
}
diff --git a/frontend/src/views/ProjectDetail.vue b/frontend/src/views/ProjectDetail.vue
index 6d3ffaf8b1..b7c70d4eb7 100644
--- a/frontend/src/views/ProjectDetail.vue
+++ b/frontend/src/views/ProjectDetail.vue
@@ -18,8 +18,10 @@
/>
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
<template v-if="state.selectedIndex == OVERVIEW_TAB">
- <DatabaseTable :mode="'PROJECT'" :databaseList="databaseList"
- /></template>
+ <div class="space-y-2">
+ <p class="text-lg font-medium leading-7 text-main">Databases</p>
+ <DatabaseTable :mode="'PROJECT'" :databaseList="databaseList" /></div
+ ></template>
<template v-else-if="state.selectedIndex == REPO_TAB"> </template>
<template v-else-if="state.selectedIndex == SETTING_TAB">
<div class="max-w-3xl mx-auto space-y-4">