Skip to content

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

chore: handle deployement config spec (#12080)

boojack7b6ca0d261ff
diff --git a/frontend/src/components/Plan/components/SpecListSection/SpecCard.vue b/frontend/src/components/Plan/components/SpecListSection/SpecCard.vue
index 6106f25043..0e4307bd73 100644
--- a/frontend/src/components/Plan/components/SpecListSection/SpecCard.vue
+++ b/frontend/src/components/Plan/components/SpecListSection/SpecCard.vue
@@ -13,7 +13,7 @@
:link="false"
class="text-gray-500 text-sm"
/>
- <span class="truncate">{{
+ <span class="truncate text-sm">{{
databaseForSpec(plan, spec).databaseName
}}</span>
</div>
@@ -22,10 +22,26 @@
class="w-full flex items-center gap-2"
>
<NTooltip>
- <template #trigger> <DatabaseGroupIcon class="w-4 h-auto" /> </template
- >{{ $t("resource.database-group") }}
+ <template #trigger><DatabaseGroupIcon class="w-4 h-auto" /></template>
+ {{ $t("resource.database-group") }}
</NTooltip>
- <span class="truncate">{{ relatedDatabaseGroup.databaseGroupName }}</span>
+ <span class="truncate text-sm">{{
+ relatedDatabaseGroup.databaseGroupName
+ }}</span>
+ </div>
+ <div
+ v-else-if="isDeploymentConfigChangeSpec(spec)"
+ class="w-full flex items-center"
+ >
+ <TenantIcon class="w-4 h-auto" />
+ <span class="text-gray-500 text-sm truncate ml-1 mr-2">
+ {{ project.title }}
+ </span>
+ <span class="text-sm">{{ $t("common.deployment-config") }}</span>
+ </div>
+ <!-- Fallback -->
+ <div v-else class="w-full flex items-center gap-2 text-sm">
+ Unknown type
</div>
</div>
</template>
@@ -35,6 +51,7 @@ import { isEqual } from "lodash-es";
import { NTooltip } from "naive-ui";
import { computed, onMounted } from "vue";
import DatabaseGroupIcon from "@/components/DatabaseGroupIcon.vue";
+import TenantIcon from "@/components/TenantIcon.vue";
import { useDBGroupStore } from "@/store";
import type { Plan_Spec } from "@/types/proto/v1/plan_service";
import {
@@ -42,6 +59,7 @@ import {
isDatabaseChangeSpec,
usePlanContext,
isGroupingChangeSpec,
+ isDeploymentConfigChangeSpec,
} from "../../logic";
const props = defineProps<{
@@ -51,6 +69,8 @@ const props = defineProps<{
const { plan, selectedSpec, events } = usePlanContext();
const dbGroupStore = useDBGroupStore();
+const project = computed(() => plan.value.projectEntity);
+
const specClass = computed(() => {
const classes: string[] = [];
if (isEqual(props.spec, selectedSpec.value)) {
diff --git a/frontend/src/components/Plan/components/StepSection/StepSection.vue b/frontend/src/components/Plan/components/StepSection/StepSection.vue
index de19f57c01..1602812197 100644
--- a/frontend/src/components/Plan/components/StepSection/StepSection.vue
+++ b/frontend/src/components/Plan/components/StepSection/StepSection.vue
@@ -1,5 +1,5 @@
<template>
- <div class="w-full flex flex-col divide-y">
+ <div v-if="show" class="w-full flex flex-col divide-y">
<template v-if="stepList.length > 0">
<div class="px-0">
<NScrollbar :x-scrollable="true" class="max-h-[180px] sm:max-h-max">
@@ -49,10 +49,13 @@
<script lang="ts" setup>
import { NScrollbar } from "naive-ui";
import { computed } from "vue";
-import { usePlanContext } from "@/components/Plan/logic";
+import { isDatabaseChangeSpec, usePlanContext } from "@/components/Plan/logic";
import StepCard from "./StepCard.vue";
-const { plan } = usePlanContext();
+const { plan, selectedSpec } = usePlanContext();
+
+// Only show steps when the selected spec is related with database changes.
+const show = computed(() => isDatabaseChangeSpec(selectedSpec.value));
const stepList = computed(() => {
return plan.value.steps || [];