Skip to content

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

feat(frontend): issue preparation dialog UI layout improvements (part.2) (#4568)

Liu Jib675438bbe94
diff --git a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
index f74913bce6..2fb50e2c18 100644
--- a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
@@ -1,7 +1,7 @@
<template>
<div class="space-y-4 max-w-min overflow-x-hidden">
<div class="overflow-x-auto">
- <div class="w-192">
+ <div class="w-[calc(100vw-8rem)] lg:w-[56rem]">
<template v-if="projectId">
<template v-if="isTenantProject">
<!-- tenant mode project -->
@@ -84,7 +84,7 @@
@select-database="selectDatabase"
>
<template #header>
- <div class="flex items-center justify-end my-2">
+ <div class="flex items-center justify-end mx-2 mb-2">
<BBTableSearch
class="m-px"
:placeholder="$t('database.search-database')"
@@ -104,13 +104,15 @@
/>
</aside>
<!-- a simple table -->
- <DatabaseTable
- mode="ALL_SHORT"
- table-class="border"
- :custom-click="true"
- :database-list="databaseList"
- @select-database="selectDatabase"
- />
+ <div class="overflow-y-auto" style="max-height: calc(100vh - 300px)">
+ <DatabaseTable
+ mode="ALL_SHORT"
+ table-class="border"
+ :custom-click="true"
+ :database-list="databaseList"
+ @select-database="selectDatabase"
+ />
+ </div>
</template>
</div>
</div>
diff --git a/frontend/src/components/AlterSchemaPrepForm/ProjectStandardView.vue b/frontend/src/components/AlterSchemaPrepForm/ProjectStandardView.vue
index fc7d485322..866b4c5efe 100644
--- a/frontend/src/components/AlterSchemaPrepForm/ProjectStandardView.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/ProjectStandardView.vue
@@ -4,10 +4,9 @@
<div v-if="databaseList.length === 0" class="textinfolabel">
{{ $t("alter-schema.no-databases-in-project") }}
</div>
- <div v-else class="textinfolabel">
- {{ $t("alter-schema.alter-multiple-db-info") }}
- </div>
- <slot name="header"></slot>
+ <template v-else>
+ <slot name="header"></slot>
+ </template>
<NCollapse
class="overflow-y-auto"
@@ -73,14 +72,14 @@
:key="dbIndex"
>
<label
- class="border-control-border relative border p-3 flex flex-col md:pl-4 md:pr-6 md:grid md:grid-cols-2"
+ class="border-control-border relative border p-3 flex flex-col gap-y-2 md:flex-row md:pl-4 md:pr-6"
:class="
database.syncStatus == 'OK'
? 'cursor-pointer'
: 'cursor-not-allowed'
"
>
- <div class="radio text-sm flex justify-start">
+ <div class="radio text-sm flex justify-start md:flex-1">
<input
type="checkbox"
class="h-4 w-4 text-accent rounded disabled:cursor-not-allowed border-control-border focus:ring-accent"
@@ -98,19 +97,14 @@
>{{ database.name }}</span
>
</div>
- <p
- class="textinfolabel ml-6 pl-1 text-sm md:ml-0 md:pl-0 md:text-right"
+ <div
+ class="flex items-center gap-x-1 textinfolabel ml-6 pl-0 md:ml-0 md:pl-0 md:justify-end"
>
- {{ $t("database.last-sync-status") }}:
- <span
- :class="
- database.syncStatus == 'OK'
- ? 'textlabel'
- : 'text-sm font-medium text-error'
- "
- >{{ database.syncStatus }}</span
- >
- </p>
+ <InstanceEngineIcon :instance="database.instance" />
+ <span class="flex-1 whitespace-pre-wrap">
+ {{ instanceName(database.instance) }}
+ </span>
+ </div>
</label>
</template>
</div>
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 3c418d31d3..85d055b339 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -636,7 +636,6 @@
"vcs-info": "VCS enabled. Selecting this will navigate you to the corresponding Git repository to initiate the change process.",
"alter-single-db": "Alter single database",
"alter-multiple-db": "Manual Selection",
- "alter-multiple-db-info": "For each environment, you can select multiple databases to alter their schemas or just skip that environment. This allows you to compose a single pipeline to propagate changes across multiple environments.",
"alter-db-group": "By Deployment Config",
"no-databases-in-project": "No databases in this project. Click New DB or Transfer in DB to add databases."
},
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index fce4bb27e8..4695481375 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -636,7 +636,6 @@
"vcs-info": "已开启 VCS 版本管理。选择该数据库会跳转到对应的 Git 仓库以发起变更流程。",
"alter-single-db": "变更单个数据库",
"alter-multiple-db": "手动选择数据库",
- "alter-multiple-db-info": "针对每个环境,您可以选择多个数据库进行变更或者直接跳过该环境,这样您就可以在一条流水线上把变更逐步作用到多个环境。",
"alter-db-group": "按部署的配置",
"no-databases-in-project": "该项目里没有数据库。点击 创建数据库 或 转移数据库 以添加数据库。"
},