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(frontend): filter by database group when rolling out branch (#13284)
Liu Ji7c043efc4ddc
diff --git a/frontend/src/components/Branch/BranchRolloutView/BranchRolloutView.vue b/frontend/src/components/Branch/BranchRolloutView/BranchRolloutView.vueindex c2bc99b31d..2c7b0b5ce8 100644--- a/frontend/src/components/Branch/BranchRolloutView/BranchRolloutView.vue+++ b/frontend/src/components/Branch/BranchRolloutView/BranchRolloutView.vue@@ -23,6 +23,7 @@:project-name="project.name":environment-name="environment?.name":filter="filterDatabase"+ :loading="isPreparingDatabaseGroups"style="width: 16rem"@update:database-name="handleSelectDatabase"/>@@ -137,6 +138,7 @@ import { DatabaseSelect, EnvironmentSelect } from "@/components/v2";import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";import {pushNotification,+ useDatabaseInGroupFilter,useDatabaseV1Store,useEnvironmentV1Store,useSheetV1Store,@@ -188,6 +190,13 @@ const {ready: virtualBranchReady,branch: virtualBranch,} = useVirtualBranch(toRef(props, "project"), toRef(props, "branch"), database);+const referencedDatabase = computed(() => {+ const name = props.branch.baselineDatabase;+ if (!name) return undefined;+ return useDatabaseV1Store().getDatabaseByName(name);+});+const { isPreparingDatabaseGroups, databaseFilter: filterDatabaseByGroup } =+ useDatabaseInGroupFilter(toRef(props, "project"), referencedDatabase);const selectedRolloutObjects = ref<RolloutObject[]>([]);const emptyBranch = Branch.fromJSON({});const isGeneratingDDL = ref(false);@@ -219,7 +228,10 @@ const handleSelectDatabase = (name: string | undefined) => {}};const filterDatabase = (db: ComposedDatabase) => {- return db.instanceResource.engine === props.branch.engine;+ return (+ db.instanceResource.engine === props.branch.engine &&+ filterDatabaseByGroup(db)+ );};const allowPreviewIssue = computed(() => {