Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: render empty deployment matrix (#13835)
Tianzhou (天舟)d4d001359d5f
diff --git a/frontend/src/components/DeploymentConfigTool/DeploymentMatrix.vue b/frontend/src/components/DeploymentConfigTool/DeploymentMatrix.vueindex 278d859641..9e3dfb5ed1 100644--- a/frontend/src/components/DeploymentConfigTool/DeploymentMatrix.vue+++ b/frontend/src/components/DeploymentConfigTool/DeploymentMatrix.vue@@ -1,6 +1,5 @@<template><div class="space-y-2 w-192 px-1">- <template v-if="databaseList.length != 0"><div class="flex justify-end items-center"><NInputGroup style="width: auto" class="py-0.5"><NInputGroupLabel@@ -28,7 +27,6 @@:deployment="deployment"/></div>- </template></div></template>diff --git a/frontend/src/components/DeploymentConfigTool/SelectorItemV2.vue b/frontend/src/components/DeploymentConfigTool/SelectorItemV2.vueindex fd6afef162..f259fef6d5 100644--- a/frontend/src/components/DeploymentConfigTool/SelectorItemV2.vue+++ b/frontend/src/components/DeploymentConfigTool/SelectorItemV2.vue@@ -143,8 +143,7 @@ const values = computed(() => {if (!props.selector.key) return [];return getLabelValuesFromDatabaseV1List(props.selector.key,- props.databaseList,- false /* !withEmptyValue */+ props.databaseList);});const valueOptions = computed(() => {diff --git a/frontend/src/components/TenantDatabaseTable/DeploymentMatrixDataTable.vue b/frontend/src/components/TenantDatabaseTable/DeploymentMatrixDataTable.vueindex 480664c41c..30e0e8ab0a 100644--- a/frontend/src/components/TenantDatabaseTable/DeploymentMatrixDataTable.vue+++ b/frontend/src/components/TenantDatabaseTable/DeploymentMatrixDataTable.vue@@ -60,8 +60,7 @@ const databaseGroupList = computed(() => {);const rows = getLabelValuesFromDatabaseV1List(props.label,- props.databaseList,- true /* withEmptyValue */+ props.databaseList).map((labelValue) => {const databaseList = dict[labelValue] || [];return {@@ -70,9 +69,10 @@ const databaseGroupList = computed(() => {};});- if (rows.length > 0 && rows[rows.length - 1].databaseList.length === 0) {- // ignore "<empty value>" row if no databases- rows.pop();+ // Add the empty label value row only if it matches any db.+ const emptyLabelDBList = dict[""] || [];+ if (emptyLabelDBList.length > 0) {+ rows.push({labelValue: "", databaseList: emptyLabelDBList})}return rows;diff --git a/frontend/src/utils/label.ts b/frontend/src/utils/label.tsindex ea82b369c5..51492f8ca0 100644--- a/frontend/src/utils/label.ts+++ b/frontend/src/utils/label.ts@@ -35,8 +35,7 @@ export const convertKVListToLabels = (export const getLabelValuesFromDatabaseV1List = (key: string,- databaseList: ComposedDatabase[],- withEmptyValue = false+ databaseList: ComposedDatabase[]): string[] => {if (key === "environment") {const environmentList = useEnvironmentV1Store().getEnvironmentList();@@ -51,15 +50,9 @@ export const getLabelValuesFromDatabaseV1List = (}return [];});- // Select all distinct database label values of {{key}}- const distinctValueList = uniq(valueList);-- if (withEmptyValue) {- // plus one more "<empty value>" if needed- distinctValueList.push("");- }- return distinctValueList;+ // Select all distinct database label values of {{key}}+ return uniq(valueList);};export const getSemanticLabelValue = (db: ComposedDatabase, key: string) => {