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: hide database config in edit schema (#9684)
ecmadaoe0cd1a785316
diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/TableColumnEditor.vue b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/TableColumnEditor.vueindex 84cea89860..2332af19ee 100644--- a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/TableColumnEditor.vue+++ b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/TableColumnEditor.vue@@ -70,9 +70,14 @@ import LabelEditorDrawer from "@/components/LabelEditorDrawer.vue";import SelectClassificationDrawer from "@/components/SchemaTemplate/SelectClassificationDrawer.vue";import SemanticTypesDrawer from "@/components/SensitiveData/components/SemanticTypesDrawer.vue";import { InlineInput } from "@/components/v2";-import { useSettingV1Store, useSubscriptionV1Store } from "@/store/modules";+import {+ useSettingV1Store,+ useSubscriptionV1Store,+ useSchemaEditorV1Store,+} from "@/store/modules";import { Engine } from "@/types/proto/v1/common";import { ColumnConfig } from "@/types/proto/v1/database_service";+import { DataClassificationSetting_DataClassificationConfig as DataClassificationConfig } from "@/types/proto/v1/setting_service";import { Table, Column, ForeignKey } from "@/types/v1/schemaEditor";import ColumnDefaultValueExpressionModal from "../../Modals/ColumnDefaultValueExpressionModal.vue";import {@@ -164,6 +169,7 @@ const layoutReady = computed(() => tableHeaderHeight.value > 0);const { t } = useI18n();const subscriptionV1Store = useSubscriptionV1Store();const settingStore = useSettingV1Store();+const schemaEditorV1Store = useSchemaEditorV1Store();const editColumnDefaultValueExpressionContext = ref<Column>();const classificationConfig = computed(() => {@@ -180,8 +186,15 @@ const semanticTypeList = computed(() => {);});+const showDatabaseConfigColumn = computed(+ () => schemaEditorV1Store.resourceType === "branch"+);+const showSemanticTypeColumn = computed(() => {- return subscriptionV1Store.hasFeature("bb.feature.sensitive-data");+ return (+ subscriptionV1Store.hasFeature("bb.feature.sensitive-data") &&+ showDatabaseConfigColumn.value+ );});const columns = computed(() => {@@ -249,10 +262,12 @@ const columns = computed(() => {width: 140,render: (column) => {return h(ClassificationCell, {- column,+ classification: column.classification,readonly: props.readonly,disabled: props.disableChangeTable,- classificationConfig: classificationConfig.value,+ classificationConfig:+ classificationConfig.value ??+ DataClassificationConfig.fromPartial({}),onEdit: () => openClassificationDrawer(column),onRemove: () => (column.classification = ""),});@@ -368,6 +383,7 @@ const columns = computed(() => {title: t("common.labels"),resizable: true,width: 140,+ hide: !showDatabaseConfigColumn.value,render: (column) => {return h(LabelsCell, {column,diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ClassificationCell.vue b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ClassificationCell.vueindex e5a745237d..c15477a296 100644--- a/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ClassificationCell.vue+++ b/frontend/src/components/SchemaEditorV1/Panels/TableColumnEditor/components/ClassificationCell.vue@@ -1,14 +1,11 @@<template><div class="flex flex-row items-center"><ClassificationLevelBadge- :classification="column.classification"+ :classification="classification":classification-config="classificationConfig"/><template v-if="!readonly && !disabled">- <MiniActionButton- v-if="column.classification"- @click.prevent="$emit('remove')"- >+ <MiniActionButton v-if="classification" @click.prevent="$emit('remove')"><XIcon class="w-3 h-3" /></MiniActionButton><MiniActionButton @click.prevent="$emit('edit')">@@ -23,10 +20,9 @@ import { PencilIcon, XIcon } from "lucide-vue-next";import ClassificationLevelBadge from "@/components/SchemaTemplate/ClassificationLevelBadge.vue";import { MiniActionButton } from "@/components/v2";import { DataClassificationSetting_DataClassificationConfig as DataClassificationConfig } from "@/types/proto/v1/setting_service";-import { Column } from "@/types/v1/schemaEditor";defineProps<{- column: Column;+ classification?: string | undefined;readonly?: boolean;disabled?: boolean;classificationConfig: DataClassificationConfig;diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableList/TableList.vue b/frontend/src/components/SchemaEditorV1/Panels/TableList/TableList.vueindex bcda9ca219..a6c4b025e2 100644--- a/frontend/src/components/SchemaEditorV1/Panels/TableList/TableList.vue+++ b/frontend/src/components/SchemaEditorV1/Panels/TableList/TableList.vue@@ -74,7 +74,10 @@ import {useSettingV1Store,useSchemaEditorV1Store,} from "@/store";-import { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";+import {+ SchemaTemplateSetting_TableTemplate,+ DataClassificationSetting_DataClassificationConfig as DataClassificationConfig,+} from "@/types/proto/v1/setting_service";import {Table,DatabaseTabContext,@@ -85,7 +88,8 @@ import { bytesToString } from "@/utils";import TableTemplates from "@/views/SchemaTemplate/TableTemplates.vue";import TableNameModal from "../../Modals/TableNameModal.vue";import { isTableChanged } from "../../utils";-import { NameCell, ClassificationCell, OperationCell } from "./components";+import ClassificationCell from "../TableColumnEditor/components/ClassificationCell.vue";+import { NameCell, OperationCell } from "./components";const props = defineProps<{schemaId: string;@@ -190,10 +194,12 @@ const columns = computed(() => {hide: !classificationConfig.value,render: (table) => {return h(ClassificationCell, {- table,+ classification: table.classification,readonly: readonly.value,disabled: !disableChangeTable(table),- classificationConfig: classificationConfig.value,+ classificationConfig:+ classificationConfig.value ??+ DataClassificationConfig.fromPartial({}),onEdit: () => showClassificationDrawer(table),onRemove: () => (table.classification = ""),});diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableList/components/ClassificationCell.vue b/frontend/src/components/SchemaEditorV1/Panels/TableList/components/ClassificationCell.vuedeleted file mode 100644index aec792fef7..0000000000--- a/frontend/src/components/SchemaEditorV1/Panels/TableList/components/ClassificationCell.vue+++ /dev/null@@ -1,38 +0,0 @@-<template>- <div class="flex flex-row items-center">- <ClassificationLevelBadge- :classification="table.classification"- :classification-config="classificationConfig"- />- <template v-if="!readonly && !disabled">- <MiniActionButton- v-if="table.classification"- @click.prevent="$emit('remove')"- >- <XIcon class="w-3 h-3" />- </MiniActionButton>- <MiniActionButton @click.prevent="$emit('edit')">- <PencilIcon class="w-3 h-3" />- </MiniActionButton>- </template>- </div>-</template>--<script lang="ts" setup>-import { PencilIcon, XIcon } from "lucide-vue-next";-import ClassificationLevelBadge from "@/components/SchemaTemplate/ClassificationLevelBadge.vue";-import { MiniActionButton } from "@/components/v2";-import { DataClassificationSetting_DataClassificationConfig as DataClassificationConfig } from "@/types/proto/v1/setting_service";-import { Table } from "@/types/v1/schemaEditor";--defineProps<{- table: Table;- readonly?: boolean;- disabled?: boolean;- classificationConfig: DataClassificationConfig;-}>();-defineEmits<{- (event: "edit"): void;- (event: "remove"): void;-}>();-</script>diff --git a/frontend/src/components/SchemaEditorV1/Panels/TableList/components/index.ts b/frontend/src/components/SchemaEditorV1/Panels/TableList/components/index.tsindex d93cfe3de4..bf413e69c5 100644--- a/frontend/src/components/SchemaEditorV1/Panels/TableList/components/index.ts+++ b/frontend/src/components/SchemaEditorV1/Panels/TableList/components/index.ts@@ -1,5 +1,4 @@-import ClassificationCell from "./ClassificationCell.vue";import NameCell from "./NameCell.vue";import OperationCell from "./OperationCell.vue";-export { NameCell, ClassificationCell, OperationCell };+export { NameCell, OperationCell };diff --git a/frontend/src/components/TableDataTable.vue b/frontend/src/components/TableDataTable.vueindex 5533bac043..469541afad 100644--- a/frontend/src/components/TableDataTable.vue+++ b/frontend/src/components/TableDataTable.vue@@ -187,6 +187,7 @@ const columns = computed(() => {const rowProps = (row: TableMetadata) => {return {+ style: "cursor: pointer;",onClick: () => {state.selectedTableName = row.name;},