Skip to content

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

chore: add checkbox for allow out of order (#14176)

boojack97c49dd5a384
diff --git a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue
index 2eb5036444..a4e954830e 100644
--- a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue
+++ b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue
@@ -19,6 +19,7 @@
<div v-if="state.previewPlanResult" class="space-y-4">
<PreviewPlanDetail
:preview-plan-result="state.previewPlanResult"
+ :allow-out-of-order="state.allowOutOfOrder"
/>
</div>
</template>
@@ -46,6 +47,12 @@
</div>
<div class="flex items-center justify-end gap-x-3">
+ <NCheckbox
+ v-model:checked="state.allowOutOfOrder"
+ :disabled="state.currentStep !== 0"
+ >
+ {{ $t("release.allow-out-of-order") }}
+ </NCheckbox>
<NButton @click.prevent="handleCancelClick">
<template v-if="state.currentStep === 1" #icon>
<Undo2Icon class="w-4 h-auto" />
@@ -76,7 +83,7 @@
<script lang="ts" setup>
import { Undo2Icon } from "lucide-vue-next";
-import { NButton } from "naive-ui";
+import { NButton, NCheckbox } from "naive-ui";
import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
@@ -108,6 +115,7 @@ const emit = defineEmits<{
type LocalState = {
currentStep: number;
+ allowOutOfOrder: boolean;
targetSelectState?: DatabaseSelectState;
previewPlanResult?: PreviewPlanResponse;
};
@@ -120,6 +128,7 @@ const { release, project } = useReleaseDetailContext();
const state = reactive<LocalState>({
currentStep: 0,
+ allowOutOfOrder: false,
});
const stepList = computed(() => [
@@ -184,8 +193,7 @@ const handleClickNext = async () => {
state.targetSelectState.changeSource === "DATABASE"
? state.targetSelectState.selectedDatabaseNameList
: [state.targetSelectState.selectedDatabaseGroup!],
- // TODO: let user choose whether to allow out of order.
- allowOutOfOrder: true,
+ allowOutOfOrder: state.allowOutOfOrder,
});
state.previewPlanResult = resp;
state.currentStep = 1;
diff --git a/frontend/src/components/Release/ReleaseDetail/NavBar/PreviewPlanDetail.vue b/frontend/src/components/Release/ReleaseDetail/NavBar/PreviewPlanDetail.vue
index e4b087241a..341732a320 100644
--- a/frontend/src/components/Release/ReleaseDetail/NavBar/PreviewPlanDetail.vue
+++ b/frontend/src/components/Release/ReleaseDetail/NavBar/PreviewPlanDetail.vue
@@ -27,7 +27,7 @@
{{ $t("release.no-tasks-to-apply.self") }}
</p>
</div>
- <div v-if="previewPlanResult.outOfOrderFiles.length > 0">
+ <div v-if="previewPlanResult.outOfOrderFiles.length > 0 && !allowOutOfOrder">
<p>
{{ $t("release.out-of-order-files") }}
</p>
@@ -74,7 +74,7 @@
<th class="w-64">
{{ $t("common.database") }}
</th>
- <th>Files</th>
+ <th>{{ $t("release.files") }}</th>
</tr>
</thead>
<tbody>
@@ -117,6 +117,7 @@ import type {
const props = defineProps<{
previewPlanResult: PreviewPlanResponse;
+ allowOutOfOrder?: boolean;
}>();
const databaseStore = useDatabaseV1Store();
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index d3bf2d8a82..dd81847974 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -3729,6 +3729,7 @@
"tasks-to-apply": "Tasks to apply",
"out-of-order-files": "Out of order files",
"applied-but-modifed-files": "Applied but modified files",
+ "allow-out-of-order": "Allow out of order",
"no-tasks-to-apply": {
"self": "No tasks to apply"
}
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 1512fb17fe..39507082a9 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -3729,6 +3729,7 @@
"tasks-to-apply": "Tareas a aplicar",
"out-of-order-files": "Archivos fuera de servicio",
"applied-but-modifed-files": "Archivos aplicados pero modificados",
+ "allow-out-of-order": "Permitir fuera de servicio",
"no-tasks-to-apply": {
"self": "No hay tareas para aplicar"
}
@@ -3818,4 +3819,4 @@
"setup": {
"self": "Configuración"
}
-}
+}
\ No newline at end of file
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index d85e6c5bb9..91a34615b2 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -3729,6 +3729,7 @@
"tasks-to-apply": "適用するタスク",
"out-of-order-files": "順序が間違っているファイル",
"applied-but-modifed-files": "適用済みだが変更されたファイル",
+ "allow-out-of-order": "順序外を許可する",
"no-tasks-to-apply": {
"self": "適用するタスクはありません"
}
@@ -3818,4 +3819,4 @@
"setup": {
"self": "設定"
}
-}
+}
\ No newline at end of file
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 23616a342e..376a161e9b 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -3729,6 +3729,7 @@
"tasks-to-apply": "待应用的任务",
"out-of-order-files": "无序文件",
"applied-but-modifed-files": "已应用但已修改的文件",
+ "allow-out-of-order": "允许无序文件",
"no-tasks-to-apply": {
"self": "没有可应用的任务"
}
@@ -3818,4 +3819,4 @@
"setup": {
"self": "设置"
}
-}
\ No newline at end of file
+}