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: improve database info display (#7683)
Liu Ji5d4ced9cbdfa
diff --git a/frontend/src/components/EnvironmentSelect.vue b/frontend/src/components/EnvironmentSelect.vueindex 1d19370827..270e601388 100644--- a/frontend/src/components/EnvironmentSelect.vue+++ b/frontend/src/components/EnvironmentSelect.vue@@ -11,7 +11,7 @@<EnvironmentV1Name:environment="environment":link="false"- :suffiux="+ :suffix="defaultEnvironment == environment.name? `(${$t('common.default')})`: ''diff --git a/frontend/src/components/IssueV1/components/StageSection/StageInfo/DatabaseInfo.vue b/frontend/src/components/IssueV1/components/StageSection/StageInfo/DatabaseInfo.vueindex de64f8a692..9f270b841b 100644--- a/frontend/src/components/IssueV1/components/StageSection/StageInfo/DatabaseInfo.vue+++ b/frontend/src/components/IssueV1/components/StageSection/StageInfo/DatabaseInfo.vue@@ -1,31 +1,45 @@<template><div class="flex items-center flex-wrap gap-1">- <EnvironmentV1Name- :environment="environment"- :plain="true"- :tooltip="true"- class="hover:underline"- />-- <heroicons-outline:chevron-right class="text-control-light" />-<InstanceV1Name:instance="coreDatabaseInfo.instanceEntity":plain="true"- class="hover:underline"- />+ text-class="hover:underline"+ >+ <template+ v-if="+ database &&+ database.instanceEntity.environment !== database.effectiveEnvironment+ "+ #prefix+ >+ <EnvironmentV1Name+ :environment="database.instanceEntity.environmentEntity"+ :plain="true"+ :show-icon="false"+ text-class="hover:underline text-control-light"+ />+ </template>+ </InstanceV1Name><heroicons-outline:chevron-right class="text-control-light" /><div class="flex items-center gap-x-1"><heroicons-outline:database />- <DatabaseV1Name- v-if="database"- :database="database"- :plain="true"- class="hover:underline"- />+ <template v-if="database">+ <EnvironmentV1Name+ :environment="database.effectiveEnvironmentEntity"+ :plain="true"+ :show-icon="false"+ text-class="hover:underline text-control-light"+ />++ <DatabaseV1Name+ :database="database"+ :plain="true"+ class="hover:underline"+ />+ </template><span v-else>{{ coreDatabaseInfo.databaseName }}</span>@@ -106,10 +120,6 @@ const databaseCreationStatus = computed((): DatabaseCreationStatus => {return "EXISTED";});-const environment = computed(() => {- return coreDatabaseInfo.value.effectiveEnvironmentEntity;-});-const database = computed(() => {const maybeExistedDatabase = coreDatabaseInfo.value;if (maybeExistedDatabase.uid !== String(UNKNOWN_ID)) {diff --git a/frontend/src/components/v2/Model/EnvironmentV1Name.vue b/frontend/src/components/v2/Model/EnvironmentV1Name.vueindex 999d9dc393..2b937b6aa6 100644--- a/frontend/src/components/v2/Model/EnvironmentV1Name.vue+++ b/frontend/src/components/v2/Model/EnvironmentV1Name.vue@@ -5,11 +5,12 @@class="inline-flex items-center gap-x-1":class="link && !plain && 'normal-link'">- <span class="line-clamp-1">+ <span class="line-clamp-1" :class="textClass">{{ environmentV1Name(environment) }}- {{ suffiux }}+ {{ suffix }}</span><ProductionEnvironmentV1Icon+ v-if="showIcon":environment="environment":class="iconClass ?? '!text-current'":tooltip="tooltip"@@ -31,7 +32,9 @@ const props = withDefaults(plain?: boolean;iconClass?: VueClass;tooltip?: boolean;- suffiux?: string;+ suffix?: string;+ showIcon?: boolean;+ textClass?: string;}>(),{tag: "span",@@ -39,7 +42,9 @@ const props = withDefaults(plain: false,iconClass: undefined,tooltip: false,- suffiux: "",+ suffix: "",+ showIcon: true,+ textClass: "",});diff --git a/frontend/src/components/v2/Model/Instance/InstanceV1Name.vue b/frontend/src/components/v2/Model/Instance/InstanceV1Name.vueindex b6a35436ea..3d135f6755 100644--- a/frontend/src/components/v2/Model/Instance/InstanceV1Name.vue+++ b/frontend/src/components/v2/Model/Instance/InstanceV1Name.vue@@ -10,7 +10,11 @@:instance="instance"/>- <span class="line-clamp-1">{{ instanceV1Name(instance) }}</span>+ <slot name="prefix" />++ <span class="line-clamp-1" :class="textClass">{{+ instanceV1Name(instance)+ }}</span><InstanceV1EngineIconv-if="icon && iconPosition === 'suffix'"@@ -33,6 +37,7 @@ const props = withDefaults(icon?: boolean;plain?: boolean;iconPosition?: "prefix" | "suffix";+ textClass?: string;}>(),{tag: "span",@@ -40,6 +45,7 @@ const props = withDefaults(icon: true,plain: false,iconPosition: "prefix",+ textClass: "",});