Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: fix flatten spec list (#14447)
boojack162bfd7b130e
diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vueindex 0cc50dc360..6ffe298351 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vue+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vue@@ -122,9 +122,7 @@ const doCreatePlan = async () => {// Create sheets for spec configs and update their resource names.const createSheets = async () => {- const flattenSpecList = plan.value.steps.flatMap((step) => {- return step.specs;- });+ const flattenSpecList = plan.value.steps.flatMap((step) => step.specs);const configWithSheetList: Plan_ChangeDatabaseConfig[] = [];const pendingCreateSheetMap = new Map<string, Sheet>();diff --git a/frontend/src/components/Plan/components/SpecListSection/SpecCard.vue b/frontend/src/components/Plan/components/SpecListSection/SpecCard.vueindex acd2fcfaac..71aeb019c5 100644--- a/frontend/src/components/Plan/components/SpecListSection/SpecCard.vue+++ b/frontend/src/components/Plan/components/SpecListSection/SpecCard.vue@@ -14,7 +14,7 @@><template #trigger><heroicons:exclamation-circle-solid- class="w-5 h-5 mr-1"+ class="w-5 h-5 shrink-0":class="[planCheckStatus === PlanCheckRun_Result_Status.ERROR? 'text-error hover:text-error-hover'@@ -28,7 +28,10 @@)}}</span></NTooltip>- <div v-if="isDatabaseChangeSpec(spec)" class="flex items-center gap-2">+ <div+ v-if="isDatabaseChangeSpec(spec)"+ class="flex items-center gap-2 truncate"+ ><InstanceV1Name:instance="databaseForSpec(plan, spec).instanceResource":link="false"@@ -40,7 +43,7 @@</div><divv-else-if="isGroupingChangeSpec(spec) && relatedDatabaseGroup"- class="flex items-center gap-2"+ class="flex items-center gap-2 truncate"><NTooltip><template #trigger><DatabaseGroupIcon class="w-4 h-auto" /></template>@@ -63,11 +66,11 @@ import DatabaseGroupIcon from "@/components/DatabaseGroupIcon.vue";import { planCheckRunSummaryForCheckRunList } from "@/components/PlanCheckRun/common";import { InstanceV1Name } from "@/components/v2";import { useDBGroupStore } from "@/store";+import { DatabaseGroupView } from "@/types/proto/v1/database_group_service";import {PlanCheckRun_Result_Status,type Plan_Spec,} from "@/types/proto/v1/plan_service";-import { DatabaseGroupView } from "@/types/proto/v1/database_group_service";import {databaseForSpec,isDatabaseChangeSpec,diff --git a/frontend/src/components/Plan/components/SpecListSection/SpecListSection.vue b/frontend/src/components/Plan/components/SpecListSection/SpecListSection.vueindex 66ffb955e1..ed39f31e49 100644--- a/frontend/src/components/Plan/components/SpecListSection/SpecListSection.vue+++ b/frontend/src/components/Plan/components/SpecListSection/SpecListSection.vue@@ -24,15 +24,11 @@ import SpecCard from "./SpecCard.vue";const MAX_LIST_HEIGHT = 207;-const { plan, selectedSpec } = usePlanContext();+const { plan } = usePlanContext();const specBar = ref<HTMLDivElement>();const specBarScrollState = useVerticalScrollState(specBar, MAX_LIST_HEIGHT);-const specList = computed(- () =>- plan.value.steps.find((step) => step.specs.includes(selectedSpec.value))- ?.specs || []-);+const specList = computed(() => plan.value.steps.flatMap((step) => step.specs));</script><style scoped lang="postcss">