Skip to content

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

chore(review-center): add confirm dialog (#12400)

boojack6bfa191df9e9
diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateIssueButton.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateIssueButton.vue
index 2498248993..7261394b71 100644
--- a/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateIssueButton.vue
+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateIssueButton.vue
@@ -7,7 +7,7 @@
tag="div"
:disabled="issueCreateErrorList.length > 0 || loading"
:loading="loading"
- @click="doCreateIssue"
+ @click="handleCreateIssue"
>
{{ loading ? $t("common.creating") : $t("issue.create-issue") }}
</NButton>
@@ -29,7 +29,7 @@
<script setup lang="ts">
import { uniqBy } from "lodash-es";
-import { NTooltip, NButton } from "naive-ui";
+import { NTooltip, NButton, useDialog } from "naive-ui";
import { zindexable as vZindexable } from "vdirs";
import { computed, nextTick, ref } from "vue";
import { useI18n } from "vue-i18n";
@@ -55,6 +55,7 @@ import {
const { t } = useI18n();
const router = useRouter();
+const dialog = useDialog();
const { plan } = usePlanContext();
const { runSQLCheck } = useSQLCheckContext();
const me = useCurrentUserV1();
@@ -101,6 +102,18 @@ const issueCreateErrorList = computed(() => {
return errorList;
});
+const handleCreateIssue = async () => {
+ dialog.info({
+ title: t("common.confirm"),
+ content: t("issue.this-plan-will-be-converted-to-a-new-issue"),
+ negativeText: t("common.cancel"),
+ positiveText: t("common.create"),
+ onPositiveClick: async () => {
+ await doCreateIssue();
+ },
+ });
+};
+
const doCreateIssue = async () => {
loading.value = true;
const check = runSQLCheck.value;
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index cd2667eea6..977c962842 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -1223,7 +1223,8 @@
"statement-type": "Statement type"
},
"sql-review-only": "SQL Review Only",
- "create-issue": "Create issue"
+ "create-issue": "Create issue",
+ "this-plan-will-be-converted-to-a-new-issue": "This plan will be converted to a new issue"
},
"alter-schema": {
"vcs-enabled": "This project has enabled VCS based version control and selecting database below will navigate you to the corresponding Git repository to initiate the change process.",
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index dfeda14d62..dfdcf0a3d6 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -1223,7 +1223,8 @@
"statement-type": "Tipo de declaración"
},
"sql-review-only": "Sólo revisión de SQL",
- "create-issue": "Crear problema"
+ "create-issue": "Crear problema",
+ "this-plan-will-be-converted-to-a-new-issue": "Este plan se convertirá en una nueva edición."
},
"alter-schema": {
"vcs-enabled": "Este proyecto ha habilitado el control de versiones basado en VCS y seleccionar la base de datos a continuación lo llevará al repositorio Git correspondiente para iniciar el proceso de cambio.",
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index d1ebf83d4d..5874b9c488 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -1223,7 +1223,8 @@
"statement-type": "ステートメントタイプ"
},
"sql-review-only": "SQLレビューのみ",
- "create-issue": "問題を作成"
+ "create-issue": "問題を作成",
+ "this-plan-will-be-converted-to-a-new-issue": "この計画は新しい問題に変換されます"
},
"alter-schema": {
"vcs-enabled": "このプロジェクトでは、VCS ベースのバージョン管理が有効になっています。以下のデータベースを選択すると、対応する Git リポジトリに移動して、変更プロセスを開始します。",
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 1016ad6b65..7b04ce3ac7 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -1223,7 +1223,8 @@
"statement-type": "语句类型"
},
"sql-review-only": "仅 SQL 审核",
- "create-issue": "创建变更工单"
+ "create-issue": "创建变更工单",
+ "this-plan-will-be-converted-to-a-new-issue": "该计划将转换为一个变更工单"
},
"alter-schema": {
"vcs-enabled": "该项目开启了基于 VCS 的版本管理,选择下面的数据库会将您导航到相应的 Git 仓库以发起变更流程。",
@@ -3539,4 +3540,4 @@
"self": "最后更新"
}
}
-}
\ No newline at end of file
+}