Skip to content

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

chore: tweak plan review UI components (#18773)

boojack862ec012721e
diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/create/RolloutCreatePanel.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/create/RolloutCreatePanel.vue
index fcc74e0321..d4cb9ed6a7 100644
--- a/frontend/src/components/Plan/components/HeaderSection/Actions/create/RolloutCreatePanel.vue
+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/create/RolloutCreatePanel.vue
@@ -33,6 +33,9 @@
$t("plan.navigator.checks")
}}</span>
<PlanCheckStatusCount :plan="plan" />
+ <span v-if="!hasAnyChecks" class="text-sm text-control-placeholder">
+ {{ $t("plan.overview.no-checks") }}
+ </span>
</div>
</div>
</template>
@@ -74,7 +77,7 @@ import { useRouter } from "vue-router";
import CommonDrawer from "@/components/IssueV1/components/Panel/CommonDrawer.vue";
import { ApprovalFlowSection } from "@/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection";
import PlanCheckStatusCount from "@/components/Plan/components/PlanCheckStatusCount.vue";
-import { usePlanContext } from "@/components/Plan/logic";
+import { usePlanCheckStatus, usePlanContext } from "@/components/Plan/logic";
import {
issueServiceClientConnect,
rolloutServiceClientConnect,
@@ -109,6 +112,7 @@ const { events } = usePlanContext();
const plan = computed(() => props.context.plan);
const issue = computed(() => props.context.issue);
const project = computed(() => props.context.project);
+const { hasAnyStatus: hasAnyChecks } = usePlanCheckStatus(plan);
const loading = ref(false);
const bypassWarnings = ref(false);
diff --git a/frontend/src/components/Plan/components/IssueReviewView/DatabaseCreateView.vue b/frontend/src/components/Plan/components/IssueReviewView/DatabaseCreateView.vue
index b1aca276ff..f7e0dc8717 100644
--- a/frontend/src/components/Plan/components/IssueReviewView/DatabaseCreateView.vue
+++ b/frontend/src/components/Plan/components/IssueReviewView/DatabaseCreateView.vue
@@ -62,26 +62,12 @@
/>
</div>
</div>
-
- <!-- SQL Statement Section -->
- <div class="flex flex-col gap-y-3">
- <h3 class="text-base font-medium">
- {{ $t("common.statement") }}
- </h3>
- <MonacoEditor
- :content="createStatement"
- :readonly="true"
- :language="'sql'"
- class="w-full h-24 border rounded-[3px]"
- />
- </div>
</div>
</template>
<script lang="ts" setup>
import { computed, watchEffect } from "vue";
import { extractCoreDatabaseInfoFromDatabaseCreateTask } from "@/components/IssueV1/logic/utils";
-import MonacoEditor from "@/components/MonacoEditor/MonacoEditor.vue";
import TaskStatus from "@/components/Rollout/kits/TaskStatus.vue";
import TaskRunTable from "@/components/RolloutV1/components/TaskRunTable.vue";
import {
@@ -98,7 +84,6 @@ import {
import type { Plan_CreateDatabaseConfig } from "@/types/proto-es/v1/plan_service_pb";
import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
import { isValidInstanceName } from "@/types/v1/instance";
-import { getSheetStatement } from "@/utils";
import { extractInstanceResourceName } from "@/utils/v1/instance";
import { usePlanContext } from "../..";
@@ -179,34 +164,6 @@ watchEffect(() => {
}
});
-// Get the sheet entity and its content
-const sheet = computed(() => {
- if (!sheetName.value) return null;
- return sheetStore.getSheetByName(sheetName.value);
-});
-
-const createStatement = computed(() => {
- // Before rollout: show placeholder message
- if (!rollout.value) {
- return "-- Statement will be shown after rollout is created";
- }
-
- if (!createDatabaseTask.value) {
- return "-- No task found for this create database spec";
- }
-
- if (!sheetName.value) {
- return "-- No sheet reference found in task";
- }
-
- if (!sheet.value) {
- return "-- Loading sheet content...";
- }
-
- // Return the actual sheet content
- return getSheetStatement(sheet.value);
-});
-
// Get task runs for this specific create database task
const taskRunsForCreateDatabase = computed(() => {
if (!rollout.value || !createDatabaseTask.value) return [];
diff --git a/frontend/src/components/Plan/components/IssueReviewView/DatabaseExportView.vue b/frontend/src/components/Plan/components/IssueReviewView/DatabaseExportView.vue
index 8dfeb69850..bda1679c0a 100644
--- a/frontend/src/components/Plan/components/IssueReviewView/DatabaseExportView.vue
+++ b/frontend/src/components/Plan/components/IssueReviewView/DatabaseExportView.vue
@@ -9,7 +9,10 @@
<LimitsSection />
<OptionsSection />
- <StatementSection />
+
+ <div class="h-72 flex flex-col">
+ <StatementSection />
+ </div>
</div>
</template>