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: update empty expression string to `true` (#6505)
boojack88f06b2b5bcd
diff --git a/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue b/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vueindex a3ecee2fd9..d0dceae2a1 100644--- a/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue+++ b/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue@@ -102,6 +102,7 @@ import { stringifyDatabaseGroupExpr } from "@/utils/databaseGroup/cel";import { Expr } from "@/types/proto/google/type/expr";import { useDebounceFn } from "@vueuse/core";import BBLoader from "@/bbkit/BBLoader.vue";+import { databaseGroupNamePrefix } from "@/store/modules/v1/common";interface LocalState {isRequesting: boolean;@@ -121,7 +122,7 @@ const databaseStore = useDatabaseV1Store();const state = reactive<LocalState>({isRequesting: false,showMatchedDatabaseList: true,- showUnmatchedDatabaseList: false,+ showUnmatchedDatabaseList: true,});const matchedDatabaseList = ref<ComposedDatabase[]>([]);const unmatchedDatabaseList = ref<ComposedDatabase[]>([]);@@ -138,7 +139,7 @@ const updateMatchingState = useDebounceFn(async () => {const result = await projectServiceClient.createDatabaseGroup({parent: props.project.name,databaseGroup: {- name: `${props.project.name}/databaseGroups/${validateOnlyResourceId}`,+ name: `${props.project.name}/${databaseGroupNamePrefix}/${validateOnlyResourceId}`,databasePlaceholder: validateOnlyResourceId,databaseExpr: Expr.fromJSON({expression: celString,diff --git a/frontend/src/components/DatabaseGroup/MatchedTableView.vue b/frontend/src/components/DatabaseGroup/MatchedTableView.vueindex 9612c35372..084d252e91 100644--- a/frontend/src/components/DatabaseGroup/MatchedTableView.vue+++ b/frontend/src/components/DatabaseGroup/MatchedTableView.vue@@ -101,7 +101,7 @@ const props = defineProps<{const state = reactive<LocalState>({isRequesting: false,showMatchedTableList: true,- showUnmatchedTableList: false,+ showUnmatchedTableList: true,});const matchedTableList = ref<SchemaGroup_Table[]>([]);const unmatchedTableList = ref<SchemaGroup_Table[]>([]);@@ -118,7 +118,7 @@ const updateMatchingState = useDebounceFn(async () => {name: `${databaseGroupName}/${schemaGroupNamePrefix}${validateOnlyResourceId}`,tablePlaceholder: validateOnlyResourceId,tableExpr: Expr.fromJSON({- expression: celString,+ expression: celString || "true",}),},schemaGroupId: validateOnlyResourceId,diff --git a/frontend/src/layouts/ProjectLayout.vue b/frontend/src/layouts/ProjectLayout.vueindex 7c0dc6dd2c..539327a10c 100644--- a/frontend/src/layouts/ProjectLayout.vue+++ b/frontend/src/layouts/ProjectLayout.vue@@ -119,7 +119,7 @@ const projectTabItemList = computed((): ProjectTabItem[] => {{ name: t("common.databases"), hash: "databases" },isTenantProject.value- ? { name: "Database groups", hash: "database-groups" }+ ? { name: t("common.database-groups"), hash: "database-groups" }: null,isTenantProject.valuediff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex b7d2814037..6aeff50278 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -251,7 +251,8 @@"years": "{years} year"},"expiration": "Expiration",- "configure": "Configure"+ "configure": "Configure",+ "database-groups": "Database Groups"},"error-page": {"go-back-home": "Go back home"@@ -2524,7 +2525,7 @@"select-role": "Select role"},"database-group": {- "self": "Database group",+ "self": "Database Group","create": "New database group","edit": "Edit database group","matched-database": "Matched database",diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex c50c734c41..746bd21687 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -251,7 +251,8 @@"years": "{years} años"},"expiration": "Expiración",- "configure": "Configure"+ "configure": "Configure",+ "database-groups": "Grupo de bases de datos"},"error-page": {"go-back-home": "Volver al inicio"diff --git a/frontend/src/locales/subscription/en-US.json b/frontend/src/locales/subscription/en-US.jsonindex 71a4d2dc16..323e1fe442 100644--- a/frontend/src/locales/subscription/en-US.json+++ b/frontend/src/locales/subscription/en-US.json@@ -75,7 +75,7 @@"disaster-recovery-advanced-tooltip": "Database backup / restore + Point-in-Time-Recovery (PITR)","sql-check": "100+ Automated SQL check","schedule-change": "Scheduled change at specific time",- "database-group": "Database group",+ "database-group": "Database Group","sync-schema": "Synchronize schema between databases","sync-schema-basic": "Basic","sync-schema-basic-tooltip": "Sync from the latest schema version",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 08a9779e6d..699b44a0e2 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -249,7 +249,8 @@"years": "{years} 年"},"expiration": "过期时间",- "configure": "配置"+ "configure": "配置",+ "database-groups": "数据库分组"},"error-page": {"go-back-home": "回到主页"diff --git a/frontend/src/plugins/cel/logic/stringify.ts b/frontend/src/plugins/cel/logic/stringify.tsindex 1d9ef96b12..3a87d19e47 100644--- a/frontend/src/plugins/cel/logic/stringify.ts+++ b/frontend/src/plugins/cel/logic/stringify.ts@@ -27,7 +27,11 @@ export function convertToCELString(expr: SimpleExpr): string {function convertLogicalExprToCELString(expr: LogicalExpr): string {const operator = convertOperatorToCELString(expr.operator);const args = expr.args.map((arg) => convertToCELString(arg));- return `(${args.join(` ${operator} `)})`;+ if (args.length > 0) {+ return `(${args.join(` ${operator} `)})`;+ } else {+ return "";+ }}function convertConditionExprToCELString(expr: ConditionExpr): string {